Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Disallowing moving a part
Disallowing moving a part [message #663141] Mon, 04 April 2011 03:43 Go to next message
AppleJus Mising name is currently offline AppleJus Mising name
Messages: 46
Registered: July 2010
Member
Hi all,

I would like to know what tag should be added to a part so that we disallow moving of the part? (dragging and dropping the part therby changing the perspective layout)
For disallowing closing it is "NoClose", but I can't seem to know for disallowing moving...

Thank you for your help!
Re: Disallowing moving a part [message #663317 is a reply to message #663141] Mon, 04 April 2011 15:13 Go to previous messageGo to next message
Eric Moffatt is currently offline Eric Moffatt
Messages: 118
Registered: July 2009
Senior Member
I've just committed the code to support this. The appropriate tag to use to inhibit moving a part is IPresentationEngine.NO_MOVE.

Adding this tag to a part will prevent the DnD's PartDragAgent from starting a drag on the part.

See bug 341793.

[Updated on: Mon, 04 April 2011 15:15]

Report message to a moderator

Re: Disallowing moving a part [message #663382 is a reply to message #663317] Mon, 04 April 2011 19:59 Go to previous messageGo to next message
AppleJus Mising name is currently offline AppleJus Mising name
Messages: 46
Registered: July 2010
Member
Hi,

This is not working Sad

part1.getTags().add("NoClose"); works!
part1.getTags().add("NoMove"); doesn'work!
part1.getTags().add(IPresentationEngine.NO_MOVE); doesn'work!

When I say doesn't work, it means I am still able to drag and drop a part to another place (say I can move it from the partstack it was in to another partstack, etc...)
This is the behavior I would like to disallow...

On the same topic, suppose the user moves around parts and changes perspective, is there a way to reset the perspective when the app starts again the next time?
Note that most of my application model is not programmatically defined, rather defined in the Application.e4xmi

Thank you
Re: Disallowing moving a part [message #663398 is a reply to message #663382] Mon, 04 April 2011 20:29 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
Did you checked out the latest sources? As Eric said he just checked in
that change to CVS!

Tom

Am 04.04.11 21:59, schrieb AppleJus:
> Hi,
> This is not working :(
>
> part1.getTags().add("NoClose"); works!
> part1.getTags().add("NoMove"); doesn'work!
> part1.getTags().add(IPresentationEngine.NO_MOVE); doesn'work!
> When I say doesn't work, it means I am still able to drag and drop a
> part to another place (say I can move it from the partstack it was in to
> another partstack, etc...)
> This is the behavior I would like to disallow...
>
> On the same topic, suppose the user moves around parts and changes
> perspective, is there a way to reset the perspective when the app starts
> again the next time?
> Note that most of my application model is not programmatically defined,
> rather defined in the Application.e4xmi
>
> Thank you
>
Re: Disallowing moving a part [message #663498 is a reply to message #663382] Tue, 05 April 2011 12:03 Go to previous messageGo to next message
Remy Suen is currently offline Remy Suen
Messages: 462
Registered: July 2009
Senior Member
AppleJus wrote on Mon, 04 April 2011 15:59
On the same topic, suppose the user moves around parts and changes perspective, is there a way to reset the perspective when the app starts again the next time?
Note that most of my application model is not programmatically defined, rather defined in the Application.e4xmi

You need '-deltaRestore false' as an argument to your application.

If that's not working, use breakpoints in E4Application to check if it's being parsed correctly.
Re: Disallowing moving a part [message #663630 is a reply to message #663398] Tue, 05 April 2011 23:08 Go to previous messageGo to next message
AppleJus Mising name is currently offline AppleJus Mising name
Messages: 46
Registered: July 2010
Member
Hi, thanks for your answers.
Sorry did not notice I should apply Eric's patch :/

But I am quite a newbie so I searched how to apply the bug fix patch but I am not able to know exactly how. Is it using the Team perspective in eclipse platform? But how to apply the patch to the e4 src code (not my project ).
Re: Disallowing moving a part [message #664245 is a reply to message #663317] Fri, 08 April 2011 02:23 Go to previous messageGo to next message
AppleJus Mising name is currently offline AppleJus Mising name
Messages: 46
Registered: July 2010
Member
Hello Eric
Thank you for the contribution.

I downlaoed the latest I build (April 5, 2011)
and tried
part.getTags().add(IPresentationEngine.NO_MOVE);

but the tag still moves around..

NoClose works.
Re: Disallowing moving a part [message #664329 is a reply to message #664245] Fri, 08 April 2011 11:49 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 04/07/2011 10:24 PM, AppleJus wrote:
> Hello Eric
> Thank you for the contribution.
>
> I downlaoed the latest I build (April 5, 2011)
> and tried
> part.getTags().add(IPresentationEngine.NO_MOVE);

That build simply picked up the latest 3.7 I build as a base. His
changes should be in last night's build.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Previous Topic:Part: closeable=false still creates closeable button in a PartSTack
Next Topic:Disabling a menu button not working
Goto Forum:
  


Current Time: Sat Sep 20 16:19:17 GMT 2014

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

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