<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>232520</bug_id>
          
          <creation_ts>2010-03-28 23:57:46 +0000</creation_ts>
          <short_desc>Kdevelop doesn&apos;t behave well when renaming opened files from IDE</short_desc>
          <delta_ts>2011-08-08 20:09:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Developer tools</classification>
          <product>kdevplatform</product>
          <component>shell</component>
          <version>unspecified</version>
          <rep_platform>Debian testing</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Valentyn Pavliuchenko">valentyn.pavliuchenko</reporter>
          <assigned_to>kdevelop-bugs-null</assigned_to>
          <cc>aleixpol</cc>
    
    <cc>niko.sams</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>941800</commentid>
    <comment_count>0</comment_count>
    <who name="Valentyn Pavliuchenko">valentyn.pavliuchenko</who>
    <bug_when>2010-03-28 23:57:46 +0000</bug_when>
    <thetext>Version:           3.9.99 + svn1107505 (using KDE 4.4.1)
Compiler:          4.4.3 20100108 
OS:                Linux
Installed from:    Debian testing/unstable Packages

If I have a file in a project, that is opened in editor and I rename it in IDE (it works well and renames references in cmake build system also) the caption of opened file doesn&apos;t change and when going back to editor it says that the file was deleted.

Steps to reproduce: create a simple project, open some code file in editor and try to rename it in the &quot;projects&quot; sidebar.

Expected behaviour: opened documents are renamed without need to reopen them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941883</commentid>
    <comment_count>1</comment_count>
    <who name="Valentyn Pavliuchenko">valentyn.pavliuchenko</who>
    <bug_when>2010-03-29 08:04:26 +0000</bug_when>
    <thetext>As for me, it&apos;s rather a bug than a wish.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941898</commentid>
    <comment_count>2</comment_count>
    <who name="Andreas Pakulat">apaku</who>
    <bug_when>2010-03-29 09:11:36 +0000</bug_when>
    <thetext>From the technical point of view it is a new feature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941921</commentid>
    <comment_count>3</comment_count>
    <who name="Valentyn Pavliuchenko">valentyn.pavliuchenko</who>
    <bug_when>2010-03-29 10:18:26 +0000</bug_when>
    <thetext>Sorry, but it&apos;s just incomplete rename functionality. This is part of &quot;rename&quot; functionality.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941938</commentid>
    <comment_count>4</comment_count>
    <who name="Andreas Pakulat">apaku</who>
    <bug_when>2010-03-29 11:01:45 +0000</bug_when>
    <thetext>No its not, &quot;rename file xyz to foo&quot; works as it should, renaming works.

Anyway, wether this is listed as bug or wish doesn&apos;t increase its priority in any way, so it won&apos;t be fixed sooner if listed as bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942159</commentid>
    <comment_count>5</comment_count>
    <who name="Niko Sams">niko.sams</who>
    <bug_when>2010-03-29 20:09:17 +0000</bug_when>
    <thetext>Well, it is a difference as we are in feature freeze...
And I want to implement this. Should I wait for after 4.0?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942173</commentid>
    <comment_count>6</comment_count>
    <who name="Andreas Pakulat">apaku</who>
    <bug_when>2010-03-29 20:41:59 +0000</bug_when>
    <thetext>Yes. And it should work no matter wether the rename happens inside kdevelop or outside of it (for a plain rename, not a move)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942180</commentid>
    <comment_count>7</comment_count>
    <who name="Valentyn Pavliuchenko">valentyn.pavliuchenko</who>
    <bug_when>2010-03-29 20:52:27 +0000</bug_when>
    <thetext>Yes, I was talking about bug/with status because of feature freeze.
I&apos;ve asked few people around me, shown them a problem and they all said that it&apos;s definitely a bug.

&gt;And it should work no matter wether the rename happens inside kdevelop or
outside of it

It would be good, but it&apos;s not as necessary as renaming inside IDE.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942195</commentid>
    <comment_count>8</comment_count>
    <who name="Andreas Pakulat">apaku</who>
    <bug_when>2010-03-29 21:17:27 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; &gt;And it should work no matter wether the rename happens inside kdevelop or
&gt; outside of it
&gt; 
&gt; It would be good, but it&apos;s not as necessary as renaming inside IDE.

The implementation needs to be independent of the IDE doing the renaming or the same happening on the filesystem. Else we&apos;ll be getting the same bugreport 2 weeks after fixing because somebody does an svn up or git merge and that renames something. Thats not an option, if this is implemented it needs to be done right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942196</commentid>
    <comment_count>9</comment_count>
    <who name="Niko Sams">niko.sams</who>
    <bug_when>2010-03-29 21:21:05 +0000</bug_when>
    <thetext>Can we detect a move outside kdevelop? Including the location it was moved to?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942208</commentid>
    <comment_count>10</comment_count>
    <who name="Andreas Pakulat">apaku</who>
    <bug_when>2010-03-29 21:59:45 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; Can we detect a move outside kdevelop? Including the location it was moved to?

Hmm, looks like we can&apos;t, I thought this was available via KDirWatch, but that one only knows deleted/created/changed signals.

Ok, so only renaming inside the IDE will be supported. Niko, can you look into how much changes this needs? I&apos;m willing to take it as bug instead of feature if the change is not too intrusive/big.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942217</commentid>
    <comment_count>11</comment_count>
    <who name="Niko Sams">niko.sams</who>
    <bug_when>2010-03-29 22:13:41 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; Niko, can you look into
&gt; how much changes this needs? I&apos;m willing to take it as bug instead of feature
&gt; if the change is not too intrusive/big.
Listening to IProjectFileManager::fileRenamed signal in DocumentController and closing and opening the renamed file. But afaics this signal is never emitted?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942226</commentid>
    <comment_count>12</comment_count>
    <who name="Valentyn Pavliuchenko">valentyn.pavliuchenko</who>
    <bug_when>2010-03-29 22:34:36 +0000</bug_when>
    <thetext>Guys, of course you are developers and you know better, but can it be done without closing/opening?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942251</commentid>
    <comment_count>13</comment_count>
    <who name="Andreas Pakulat">apaku</who>
    <bug_when>2010-03-29 23:50:57 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; Guys, of course you are developers and you know better, but can it be done
&gt; without closing/opening?

Not without changing Kate, so thats definetly something for KDevelop4.1 (which then would need to depend on KDE 4.5 - if this is done inside Kate for kde4.5)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942252</commentid>
    <comment_count>14</comment_count>
    <who name="Andreas Pakulat">apaku</who>
    <bug_when>2010-03-29 23:53:04 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; Niko, can you look into
&gt; &gt; how much changes this needs? I&apos;m willing to take it as bug instead of feature
&gt; &gt; if the change is not too intrusive/big.
&gt; Listening to IProjectFileManager::fileRenamed signal in DocumentController and
&gt; closing and opening the renamed file. But afaics this signal is never emitted?

Yeap, its never emitted, however that really is a bugfix.

That solution sounds simple enough, so changing this to bug to allow it being for 4.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>942253</commentid>
    <comment_count>15</comment_count>
    <who name="Valentyn Pavliuchenko">valentyn.pavliuchenko</who>
    <bug_when>2010-03-29 23:53:37 +0000</bug_when>
    <thetext>Can you fill a wish for Kate? Better to record this idea:)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151009</commentid>
    <comment_count>16</comment_count>
    <who name="Aleix Pol">aleixpol</who>
    <bug_when>2011-08-07 13:38:50 +0000</bug_when>
    <thetext>Git commit 38ab0d0878e027777608c437980a28ba7bb53208 by Aleix Pol.
Committed on 07/08/2011 at 15:36.
Pushed by apol into branch &apos;master&apos;.

Make the document controller to listen to the project&apos;s so that whenever
an open file is renamed, that file should be closed and reopened with the new name.

BUG: 232520

M  +23   -0    shell/documentcontroller.cpp
M  +4    -1    shell/documentcontroller.h

http://commits.kde.org/kdevplatform/38ab0d0878e027777608c437980a28ba7bb53208</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151143</commentid>
    <comment_count>17</comment_count>
    <who name="Valentyn Pavliuchenko">valentyn.pavliuchenko</who>
    <bug_when>2011-08-07 19:18:07 +0000</bug_when>
    <thetext>Just compiled sources (this fix included).

Renaming modified file causes loosing unsaved changes without any notice. So I&apos;m reopening this because of incorrect behavior.

This is the place where reopening just sucks. Please find a way to do it without closing/opening document (kate kpart changes, etc). Every normal IDE just renames a tab.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151317</commentid>
    <comment_count>18</comment_count>
    <who name="Aleix Pol">aleixpol</who>
    <bug_when>2011-08-08 08:12:17 +0000</bug_when>
    <thetext>I just fixed the discard thing, so that you don&apos;t lose any changes.

The other complaint should be reported in a new bug report.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151596</commentid>
    <comment_count>19</comment_count>
    <who name="Valentyn Pavliuchenko">valentyn.pavliuchenko</who>
    <bug_when>2011-08-08 20:09:19 +0000</bug_when>
    <thetext>Verified - fine now. Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>