Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Disable Note attachment completly(disable Note attachment completly)
Disable Note attachment completly [message #535809] Tue, 25 May 2010 17:56 Go to next message
nitesh  is currently offline nitesh Friend
Messages: 8
Registered: December 2009
Junior Member
Hello All,

I am trying to remove the Notes attachment completely from my diagram, as I am using Emfstore and ECP for my model and the notes are causing trouble at times!

I removed them from the palette by adding an extension in my diagram plugin
<extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders"> 
  <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
    <Priority name="High"/>
      <contribution>
     	<predefinedEntry id="standardGroup/zoomTool" remove="true"/>
     	<predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/> 
	<predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/> 
	<predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
      </contribution>
      <editor
            id="org.test.diagram.activityDiagram.part.ModelDiagramEditorID">
      </editor>
  </paletteProvider>
</extension> 



Now I want to remove it from within the gmf diagram editor for the diagram and from the source and target drag menu items for any element of the diagram! Any suggestion to fix this is very much appreciated!


Thanks a lot in advance,
Nitesh

[Updated on: Tue, 25 May 2010 17:58]

Report message to a moderator

Re: Disable Note attachment completly [message #535881 is a reply to message #535809] Wed, 26 May 2010 08:17 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 21
Registered: May 2010
Junior Member
Hi Nitesh,

Try to override canAttachNote() method in your NodeEditPart, make it return false.

Tanya.
Re: Disable Note attachment completly [message #535896 is a reply to message #535881] Wed, 26 May 2010 09:09 Go to previous message
nitesh  is currently offline nitesh Friend
Messages: 8
Registered: December 2009
Junior Member
Hi Tanya,

Thanks a lot. It worked flawlessly Razz

Nitesh
Previous Topic:Migration to Eclipse 3.6
Next Topic:Command#canExecute is false, why ?
Goto Forum:
  


Current Time: Mon May 20 22:54:56 GMT 2024

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

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

Back to the top