Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Howto: Edit the text of a tree item (in place, fancy)
Howto: Edit the text of a tree item (in place, fancy) [message #451929] Fri, 11 March 2005 11:19 Go to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Hi,

I am currently using the snippet 111:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet111.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

in order to edit the text of a treeitem in place. But compared to the
"Rename" action
in Eclipse's Navigator (Resource perspective) it behaves a bit differently:

1.) The black-box (edit textfield) has a bigger width in Eclipse's Navigator
2.) The text of the TreeItem that is being edited is not moving to the
left. In the
Snippet I am seeing a movement (~1px) to the left as soon as the
editing begins.

Is Eclipse using a different solution? Maybe someone could point me to
the way Eclipse
is doing it.

Thanks,
Ben
Re: Howto: Edit the text of a tree item (in place, fancy) [message #451976 is a reply to message #451929] Fri, 11 March 2005 17:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

See TreeEditor. That's what the Resource Navigator uses, as well.

(Yes, snippet 111 has a number of problems. The simulated border looks
especially awful on MacOSX, the positions are wrong, etc.)

Bob Foster

Benjamin Pasero wrote:
> Hi,
>
> I am currently using the snippet 111:
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet111.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
>
> in order to edit the text of a treeitem in place. But compared to the
> "Rename" action
> in Eclipse's Navigator (Resource perspective) it behaves a bit differently:
>
> 1.) The black-box (edit textfield) has a bigger width in Eclipse's Navigator
> 2.) The text of the TreeItem that is being edited is not moving to the
> left. In the
> Snippet I am seeing a movement (~1px) to the left as soon as the
> editing begins.
>
> Is Eclipse using a different solution? Maybe someone could point me to
> the way Eclipse
> is doing it.
>
> Thanks,
> Ben
Re: Howto: Edit the text of a tree item (in place, fancy) [message #452497 is a reply to message #451976] Mon, 21 March 2005 15:24 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
For me, using the example from the Snippet makes no difference. I am
still seeing the
two problems I mentioned.

Ben

> See TreeEditor. That's what the Resource Navigator uses, as well.
>
> (Yes, snippet 111 has a number of problems. The simulated border looks
> especially awful on MacOSX, the positions are wrong, etc.)
>
> Bob Foster
>
> Benjamin Pasero wrote:
>
>> Hi,
>>
>> I am currently using the snippet 111:
>>
>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet111.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
>>
>>
>> in order to edit the text of a treeitem in place. But compared to the
>> "Rename" action
>> in Eclipse's Navigator (Resource perspective) it behaves a bit
>> differently:
>>
>> 1.) The black-box (edit textfield) has a bigger width in Eclipse's
>> Navigator
>> 2.) The text of the TreeItem that is being edited is not moving to the
>> left. In the
>> Snippet I am seeing a movement (~1px) to the left as soon as the
>> editing begins.
>>
>> Is Eclipse using a different solution? Maybe someone could point me to
>> the way Eclipse
>> is doing it.
>>
>> Thanks,
>> Ben
>
Re: Howto: Edit the text of a tree item (in place, fancy) [message #452514 is a reply to message #452497] Mon, 21 March 2005 20:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

Benjamin Pasero wrote:

> For me, using the example from the Snippet makes no difference. I am
> still seeing the
> two problems I mentioned.

Hmm. I guess you'd have to chase down how Resource Navigator adjusts the
position and size of TreeEditor. I only looked far enough to see that it
used TreeEditor (even that wasn't much fun).

Bob

> Ben
>
>
>>See TreeEditor. That's what the Resource Navigator uses, as well.
>>
>>(Yes, snippet 111 has a number of problems. The simulated border looks
>>especially awful on MacOSX, the positions are wrong, etc.)
>>
>>Bob Foster
>>
>>Benjamin Pasero wrote:
>>
>>
>>>Hi,
>>>
>>>I am currently using the snippet 111:
>>>
>>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet111.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
>>>
>>>
>>>in order to edit the text of a treeitem in place. But compared to the
>>>"Rename" action
>>>in Eclipse's Navigator (Resource perspective) it behaves a bit
>>>differently:
>>>
>>>1.) The black-box (edit textfield) has a bigger width in Eclipse's
>>>Navigator
>>>2.) The text of the TreeItem that is being edited is not moving to the
>>>left. In the
>>> Snippet I am seeing a movement (~1px) to the left as soon as the
>>>editing begins.
>>>
>>>Is Eclipse using a different solution? Maybe someone could point me to
>>>the way Eclipse
>>>is doing it.
>>>
>>>Thanks,
>>>Ben
>>
Re: Howto: Edit the text of a tree item (in place, fancy) [message #452854 is a reply to message #452514] Fri, 25 March 2005 05:24 Go to previous messageGo to next message
Ed Burnette is currently offline Ed BurnetteFriend
Messages: 279
Registered: July 2009
Senior Member
The BIRT Data Explorer view has a nice implementation of this.
Re: Howto: Edit the text of a tree item (in place, fancy) [message #452856 is a reply to message #452514] Fri, 25 March 2005 05:24 Go to previous messageGo to next message
Ed Burnette is currently offline Ed BurnetteFriend
Messages: 279
Registered: July 2009
Senior Member
The BIRT Data Explorer view has a nice implementation of this.
Re: Howto: Edit the text of a tree item (in place, fancy) [message #452861 is a reply to message #452856] Fri, 25 March 2005 11:25 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Ed Burnette wrote:

> The BIRT Data Explorer view has a nice implementation of this.

Hm, what/where is the BIRT Data Explorer?

Ben
Re: Howto: Edit the text of a tree item (in place, fancy) [message #452889 is a reply to message #452861] Sat, 26 March 2005 05:51 Go to previous messageGo to next message
Ed Burnette is currently offline Ed BurnetteFriend
Messages: 279
Registered: July 2009
Senior Member
http://www.eclipse.org/birt

They did the click-wait-click again method of renaming and the F2
method. I haven't looked at the code but it runs in 3.0.1 so it's not
relying on any new 3.1 features.

Benjamin Pasero wrote:
> Hm, what/where is the BIRT Data Explorer?
Re: Howto: Edit the text of a tree item (in place, fancy) [message #452891 is a reply to message #452889] Sat, 26 March 2005 08:36 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Ah ok thanks.
But the Navigator in Eclipse is also doing it, somehow different from
the Snippet. Maybe
the snippet could be updated with Eclipse's approach.

> http://www.eclipse.org/birt
>
> They did the click-wait-click again method of renaming and the F2
> method. I haven't looked at the code but it runs in 3.0.1 so it's not
> relying on any new 3.1 features.
>
> Benjamin Pasero wrote:
>
>> Hm, what/where is the BIRT Data Explorer?
>
Re: Howto: Edit the text of a tree item (in place, fancy) [message #452994 is a reply to message #451976] Tue, 29 March 2005 16:21 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Bob, can you enter a bug report for this?

"Bob Foster" <bob@objfac.com> wrote in message
news:4231DBFC.8070807@objfac.com...
> See TreeEditor. That's what the Resource Navigator uses, as well.
>
> (Yes, snippet 111 has a number of problems. The simulated border looks
> especially awful on MacOSX, the positions are wrong, etc.)
>
> Bob Foster
>
> Benjamin Pasero wrote:
> > Hi,
> >
> > I am currently using the snippet 111:
> >
> >
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet111.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
> >
> > in order to edit the text of a treeitem in place. But compared to the
> > "Rename" action
> > in Eclipse's Navigator (Resource perspective) it behaves a bit
differently:
> >
> > 1.) The black-box (edit textfield) has a bigger width in Eclipse's
Navigator
> > 2.) The text of the TreeItem that is being edited is not moving to the
> > left. In the
> > Snippet I am seeing a movement (~1px) to the left as soon as the
> > editing begins.
> >
> > Is Eclipse using a different solution? Maybe someone could point me to
> > the way Eclipse
> > is doing it.
> >
> > Thanks,
> > Ben
Re: Howto: Edit the text of a tree item (in place, fancy) [message #453015 is a reply to message #452994] Tue, 29 March 2005 23:25 Go to previous message
Eclipse UserFriend
Originally posted by: bob.objfac.com

Steve Northover wrote:
> Bob, can you enter a bug report for this?

It's https://bugs.eclipse.org/bugs/show_bug.cgi?id=89434.

I'll trade you. I've seen lots of people put links in Bugzilla bug
reports, but <a> doesn't work (as 89434 clearly shows). What's the trick?

Bob

> "Bob Foster" <bob@objfac.com> wrote in message
> news:4231DBFC.8070807@objfac.com...
>
>>See TreeEditor. That's what the Resource Navigator uses, as well.
>>
>>(Yes, snippet 111 has a number of problems. The simulated border looks
>>especially awful on MacOSX, the positions are wrong, etc.)
>>
>>Bob Foster
>>
>>Benjamin Pasero wrote:
>>
>>>Hi,
>>>
>>>I am currently using the snippet 111:
>>>
>>>
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet111.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
>
>>>in order to edit the text of a treeitem in place. But compared to the
>>>"Rename" action
>>>in Eclipse's Navigator (Resource perspective) it behaves a bit
>
> differently:
>
>>>1.) The black-box (edit textfield) has a bigger width in Eclipse's
>
> Navigator
>
>>>2.) The text of the TreeItem that is being edited is not moving to the
>>>left. In the
>>> Snippet I am seeing a movement (~1px) to the left as soon as the
>>>editing begins.
>>>
>>>Is Eclipse using a different solution? Maybe someone could point me to
>>>the way Eclipse
>>>is doing it.
>>>
>>>Thanks,
>>>Ben
>
>
>
Previous Topic:Mac button layout
Next Topic:Textfield in a PopUp menu - is it possible?
Goto Forum:
  


Current Time: Fri Apr 19 01:21:09 GMT 2024

Powered by FUDForum. Page generated in 0.03402 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top