| Forum: GMF (Graphical Modeling Framework) |
|---|
| Topic: get target after creating relationship |
|---|
| get target after creating relationship [message #876405] |
Thu, 24 May 2012 10:31 |
Chris B. Messages: 19 Registered: November 2011 |
Junior Member |
|
|
Hi everyone,
i have overriden the AbstractEditHelperAdvice class to create a new command in the getAfterCreateRelationshipCommand method. Once i drop a connection from one node to another i want to return a new command depending on the target. My problem is that request.getTarget() always returns null. The source node is recognized but i need to know on which diagram element in the canvas the connection was dropped. Any help appreciated.
Regards
Chris
|
|
|
| Topic: Problem with connector of Tree Routing type |
|---|
| Problem with connector of Tree Routing type [message #872732] |
Wed, 16 May 2012 14:00 |
Abbas Mohd Messages: 24 Registered: February 2012 |
Junior Member |
|
|
Hi,
I am creating the GMF nodes programatically.
I am using tree routing as my routing style,but in some of the places i am facing issues with connectors.
Please see the attachment.
Can some one tell me why i am getting this problem and how to resolve this.
Thanks in advance.
|
|
|
| Topic: Preventing dnd of compartment children outside parent node |
|---|
| Preventing dnd of compartment children outside parent node [message #872512] |
Wed, 16 May 2012 04:57 |
Chris B. Messages: 19 Registered: November 2011 |
Junior Member |
|
|
Hi everyone,
how can i disallow it to drag elements of a compartment into another compartment of a different parent node that is of the same type? Actually, it shouldn't be possible at all to drag an element out of the compartment. If each editpart would have an accessible unique id, i could solve it with OCL. Any ideas?
regards
Chris
|
|
|
| Topic: Integrating a GMF editor in JFace editor. |
|---|
| Integrating a GMF editor in JFace editor. [message #871572] |
Mon, 14 May 2012 08:57 |
eni bundo Messages: 7 Registered: March 2012 |
Junior Member |
|
|
Hello we have a (JFace) eclipse plugin - editor with multiple tabs.
The editor extends FormEditor and the tabs/pages are classes that extend FormPage.
On the other hand we have created a GMF editor that we would like to integrate in our existing plugin as another tab.
The problem is that our GMF editor is of type MultiPageEditor(Part).
Is this achievable? If yes how?
Thanks in advance
-Eni
|
|
|
| Topic: How can i make a shortcut that can't be contained in the root element? |
|---|
| How can i make a shortcut that can't be contained in the root element? [message #870691] |
Wed, 09 May 2012 07:16 |
Javier Belenguer Messages: 4 Registered: May 2012 |
Junior Member |
|
|
I need to link several different types of elements from my diagram to shortcuts from a model based on a different meta-model, but it seems you can only make shortcuts that can be contained in the root element. Is there any way to solve that? I can't modify the ecore model so the root element can contain the shortcut element or anything like that.
There's an old post from 2008 about it and he was told to report it as a bug, so maybe there's a solution now but I can't find it.
|
|
|
| Topic: Diagram partitioning |
|---|
| Diagram partitioning [message #870338] |
Mon, 07 May 2012 13:02 |
Ondra Netocny Messages: 7 Registered: July 2011 |
Junior Member |
|
|
Hello!
I am working on gmf application. I have one complex ecore model and one finished diagram tool. But now I woul like to create a sub diagram which will include some features frome ecore that are not in first diagram. I have followed wiki.eclipse.org/Diagram_Partitioning and www.jevon.org/wiki/GMF_Diagram_Partitioning turorial, but I am still having problem to configure gmfgens files right. I am still getting exceptions from OpenDiagramEditPolicy such a "Can't open diagram". I think that problem is somewhere in gmfgen files. I would be gratefull for any kind of help.
Ondra
|
|
|
| Topic: How to create a umlclass file, and create some notations and then save by programming |
|---|
|
| Topic: View FillStyle |
|---|
| View FillStyle [message #863340] |
Sun, 29 April 2012 07:56 |
Davy Ncuti Messages: 1 Registered: April 2012 |
Junior Member |
|
|
Hello
I am decomposing a diagram and I would like some of the components to appear half transparent while others are fully opaque.
I have view objects that I would like to change the appearance depending on whether the object is part of the needed nodes or not. So far I wanted to use a fill style to modify the appearance of the view and set the transparency as follows:
FillStyle fillStyle = org.eclipse.gmf.runtime.notation.NotationFactory.eINSTANCE.createFillStyle();
fillStyle.setTransparency(1)
and later on use an AddCommand as follows that would update the visibility of my diagram:
AddCommand setFillStyle = new AddCommand(editor.getEditingDomain(), view,NotationPackage.eINSTANCE.getView_Styles(), fillStyle);
However this approach seems not to work and I am out of ideas of how to do it. Can anyone help me please? I am really stuck
|
|
|
| Topic: Multiline direct label editing not working in Mac Cocoa |
|---|
| Multiline direct label editing not working in Mac Cocoa [message #859558] |
Fri, 27 April 2012 13:48 |
CathyScott Messages: 10 Registered: July 2011 |
Junior Member |
|
|
I'm not sure if this is a GMF or SWT issue. Even if it is an SWT bug I would be very interested to hear of a work around for the problem.
I have an RCP app based on GMF and Indigo. In the graphical editor I have a multiline label.
Multiline editing of the label works perfectly in Windows and Mac Carbon but not in Mac Cocoa.
I have checked the GMF examples - in particular the Logic example and this shows the same problem.
For example, the Text and Note tools are examples of multiline editing. On Windows and Mac Carbon, Ctrl+Enter adds a manual line break.
On Mac Cocoa, only a single line is ever displayed.
|
|
|
| Topic: Exception when dragging shapes within compartment |
|---|
| Exception when dragging shapes within compartment [message #855953] |
Wed, 25 April 2012 04:32 |
Chris B. Messages: 19 Registered: November 2011 |
Junior Member |
|
|
Hi,
as mentioned above i have a problem dragging a shape outside of the visible area of a compartment. As soon as i drag the shape towards the compartments border a NPE is thrown. It doesn't affect the application flow but it's really annoying. Does anyone know the reason for this exception? Here's the stacktrace:
java.lang.NullPointerException
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.ShapeCompartmentDropEditPolicy.getDropCommand(ShapeCompartmentDropEditPolicy.java:55)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy.getCommand(DragDropEditPolicy.java:75)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy.showTargetFeedback(DragDropEditPolicy.java:181)
at org.eclipse.gef.editparts.AbstractEditPart.showTargetFeedback(AbstractEditPart.java:1079)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.showTargetFeedback(GraphicalEditPart.java:1391)
at org.eclipse.gef.tools.TargetingTool.showTargetFeedback(TargetingTool.java:378)
at org.eclipse.gef.tools.DragEditPartsTracker.handleDragInProgress(DragEditPartsTracker.java:363)
at org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx.handleDragInProgress(DragEditPartsTrackerEx.java:177)
at org.eclipse.gef.tools.AbstractTool.mouseDrag(AbstractTool.java:1115)
at org.eclipse.gef.tools.SelectionTool.mouseDrag(SelectionTool.java:536)
at org.eclipse.gef.EditDomain.mouseDrag(EditDomain.java:259)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:363)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:543)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:205)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
|
|
|
| Topic: How do you set the lines not to overlap each other? |
|---|
| How do you set the lines not to overlap each other? [message #855511] |
Tue, 24 April 2012 18:14 |
Che Bumagat Messages: 14 Registered: February 2012 |
Junior Member |
|
|
Hello GMF Experts!
In my diagram editor, i have set my diagram preference to use a RECTILINEAR style of connection routing.
The way my diagram is structured is that I have a Figure A on the right side and I have a Figure B on the left. They have elements inside which I map using the lines.
However, I notice that when mapping the elements from Figure A to B, the lines always stick in the middle (see picture). Is there a way to have these lines not overlap each other?
I'm new to GMF so appreciate the help you guys provide! Thanks!
|
|
|
| Topic: GMF |
|---|
| GMF [message #843899] |
Fri, 13 April 2012 09:29 |
vanessa vanessa Messages: 4 Registered: April 2012 |
Junior Member |
|
|
Hello,
I'm new to GMF , till now i've created my own diagram editor
successfully .I tested it in an eclipse instance and it works fine.
When trying to deploy the plugin (via the menu item export)
my plugin is generated with errors.This errors are caused by assert statements.
I'm actually working with eclipse indigo ,Jre7 is running .
what shall I do ??I have to use the jar files of the plug-in deployed.
Thank you very much in advance
Kind regards.
|
|
|
| Topic: Deploying Problems |
|---|
| Deploying Problems [message #843713] |
Fri, 13 April 2012 05:47 |
vanessa vanessa Messages: 4 Registered: April 2012 |
Junior Member |
|
|
Hello,
I'm new to GMF , till now i've created my own diagram editor
successfully .I tested it in an eclipse instance and it works fine.
When trying to deploy the plugin (via the menu item export)
my plugin is generated with errors.This errors are caused by assert statements.
I'm actually working with eclipse indigo ,Jre7 is running .
what shall I do ??I have to use the jar files of the plug-in deployed.
Thank you very much in advance
Kind regards.
|
|
|
| Topic: Adding new context menu option to a palette entry |
|---|
| Adding new context menu option to a palette entry [message #839964] |
Mon, 09 April 2012 09:36 |
ganesh ram Messages: 20 Registered: January 2012 |
Junior Member |
|
|
Hi,
Suppose i have a palette on my GMF diagram, and have nodes A and B on that.
I want to be able to right click on nodeA on the palette, and display a "View" option on the context menu, selecting on the "View" option would pop up some info on NodeA.
How could i accomplish this ?
Pls help.
|
|
|
| Topic: copying / Cloning a Diagram object |
|---|
| copying / Cloning a Diagram object [message #835486] |
Tue, 03 April 2012 05:31 |
ganesh ram Messages: 20 Registered: January 2012 |
Junior Member |
|
|
This is what am trying to do.
I create a GMF Model - (this serves as a template in my usecase).
Now i want to create an instance of this model.
I have added a new menu to the right click context-menu say "Create Instance".
In the corresponding action class, i want to create an instance of this model.
The instance would look similar to the model, but with a few attributes in the "Property View" enabled.
public static Resource createDiagram(URI diagramURI, URI modelURI, final Application application, final Diagram appModelDiagram, IProgressMonitor progressMonitor) {
TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain();
progressMonitor.beginTask(Messages.ApplicationDiagramEditorUtil_CreateDiagramProgressTask,3);
final Resource diagramResource = editingDomain.getResourceSet().createResource(diagramURI);
final Resource modelResource = editingDomain.getResourceSet().createResource(modelURI);
final String diagramName = diagramURI.lastSegment();
AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain, Messages.ApplicationDiagramEditorUtil_CreateDiagramCommandLabel, Collections.EMPTY_LIST) {
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
//checkpoint A [b]Application model = application;[/b]
//checkpoint B modelResource.getContents().add(model);
//checkpoint C [b]Diagram diagram = appModelDiagram;[/b]
if (diagram != null) {
//checkpoint D diagramResource.getContents().add(diagram);
diagram.setName(diagramName);
diagram.setElement(model);
}
try {
modelResource.save(ApplicationDiagramEditorUtil.getSaveOptions());
diagramResource.save(ApplicationDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
ApplicationDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e);
}
return CommandResult.newOKCommandResult();
}
};
try {
OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null);
} catch (ExecutionException e) {
ApplicationDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e);
}
setCharset(WorkspaceSynchronizer.getFile(modelResource));
setCharset(WorkspaceSynchronizer.getFile(diagramResource));
return diagramResource;
}
In the lines that i have made bold (checkpoint A & C), when i create an instance, i wanted to reuse the domain and diagram objects of the Model file.
But i get the following exception at lines checkpoint B &D- "IllegalStateException Cannot modify resource set without a write transaction".
At checkpoint A, I created a new Application object and set the values from the old object to the new object and this solved the first problem.
Now to create the Diagram object for the instance, should i create a new Diagram Object using "ViewService.createDiagram()", iterate through & set all the children from the old to the new Diagram object. This seems a little complicated.
Is there any way to clone the Diagram object or reuse the diagram object ?
How do i accomplish this ?
|
|
|
| Topic: runtime extension of a GMF editor with additional elements |
|---|
|
| Topic: Rotate label |
|---|
| Rotate label [message #806141] |
Fri, 24 February 2012 10:32 |
Laurent Redor Messages: 17 Registered: July 2009 |
Junior Member |
|
|
Hi,
I've found several issues on the bugzilla about the label rotation or
more generraly about the rotation of the Graphics :
Is there a solution in GMF to provide labels with a rotation angle? If
this is not the case, have you already thought about providing it?
Found issues about this problem :
* Bug 130419 - implement rotate for ScaledGraphics : With the snippet
attached at the end of this issue, it seems that the functionnality is
OK under draw2d.
* Bug 167316 - [EditPart] Better support for rotation
* Bug 103717 - DCR: Setting to choose advanced graphics for zoom/scaling
instead of ScaledGraphics
* Bug 253670 - Line and Path not drawn when 45-degree rotation is applied
* Bug 335769 - org.eclipse.swt.graphics.Transform does not handle rotate
45 degree correctly.
* Bug 105938 - [Print] PrinterGraphics.rotate() doesn't work properly
Regards,
Laurent
|
|
|
| Topic: Grouping Nodes on the canvas |
|---|
| Grouping Nodes on the canvas [message #780787] |
Thu, 19 January 2012 06:29 |
ganesh ram Messages: 20 Registered: January 2012 |
Junior Member |
|
|
i am trying to group the nodes on the UI.
I followed the instructions mentioned in Bugzilla Bug 111892 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=111892
It does not work for me .
I created a new plugin project and extended the org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders.
by copying the <extension> contenets from the doc available in the above link.
I changed the extension "id" and "name" attributes.
I removed the <method> tag (for now i am ok if it shows up in other gmf editors)
I have retained the objectClass="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart" .
I have also tried the *EditPart of my model.
Any suggestions on what i could have missed ?
Could it be that i have not included any other plugin as a dependency ?
I also checked the "Logic" example and it works fine there. not sure what i have missed
[Updated on: Thu, 19 January 2012 07:22] Report message to a moderator
|
|
|
| Topic: [GMF Runtime] Regression from https://bugs.eclipse.org/bugs/show_bug.cgi?id=194482 fix on Rectilinea |
|---|
| [GMF Runtime] Regression from https://bugs.eclipse.org/bugs/show_bug.cgi?id=194482 fix on Rectilinea [message #780489] |
Wed, 18 January 2012 04:40 |
Esteban Dugueperoux Messages: 217 Registered: July 2009 |
Senior Member |
|
|
Hi,
I have a GMF based application which works on Eclipse 3.3 and 3.5, with
a example gmf notation model I have a edge with four bendpoints, on 3.3
the RectilinearRouter route the connection by computing 4 draw2d points
but on 3.5, it the routing results in 6 draw2d points, which is ugly. I
have the same issue (yet on 3.5) when moving a connection's
source/target, the RectilinearRouter add new points while it is not
necessary to have rectilinear polyline.
Analyzing this issue, I have seen the
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194482 fix which causes
this regression, indeed using the RectilinearRouter before the fix of
the ticket, I have not this issue.
Like I can't provide my example, I have attached a patch to the
RectilinearRouterTest to show the issue. Using the latest
RectilinearRouter (from trunk) the pointList's size is 6 while before
the fix of https://bugs.eclipse.org/bugs/show_bug.cgi?id=194482 the
pointList's size is 4.
Best Regards.
Attachment: test.patch
(Size: 3.46KB, Downloaded 26 times)
|
|
|
| Topic: ShortestPathConnectionRouter with GMF components |
|---|
| ShortestPathConnectionRouter with GMF components [message #775808] |
Fri, 06 January 2012 12:58 |
Alex Kravets Messages: 298 Registered: November 2009 |
Senior Member |
|
|
Hello,
In my GEF application I use ShortestPathConnectionRouter and wanted to employ some of graphical components from GMF to make connections more smooth on the bends. Specifically I am using PolylineConnectionEx. When I set smoothness of connection - poly.setSmoothness(PolylineConnectionEx.SMOOTH_LESS); the lines don't look as smooth as I'd like - they are rigid on bends.

I looked at GMF routers such as RectilinearRouter and bends look very smooth, however this router implments OrthogonalRouter interface and PolylineConnectionEx's method isRoundingBendpoints() requires that routers in OrthogonalRouter. I repurposed ShortestPathConnectionRouter to implement OrthogonalRouter in order to make connection bends more smooth:
.
Why does rounding bendpoints algorithm needs router to be OrthogonalRouter and it is possible to achieve even more smoothness with ShortestPathConnectionRouter too look something like this?

Thanks,
Alex
[Updated on: Fri, 06 January 2012 12:59] Report message to a moderator
|
|
|
| Topic: Embedded diagram doesn't appear |
|---|
| Embedded diagram doesn't appear [message #769789] |
Thu, 22 December 2011 12:08 |
Mostafa Fouly Messages: 19 Registered: December 2011 |
Junior Member |
|
|
Hello,
I have built a GMF Model and it's working fine but the problem is diagrams don't appear when they are embedded? only the parent diagram appears!
Kindly check the screen shot...the "Bed" node can't be embedded in the "Bedroom" diagram...actually it is embedded but not visible, So when i just press enter it disappears! Can anybody help me out with that?
Thanks,
Mostafa.
Attachment: Capture.JPG
(Size: 65.16KB, Downloaded 30 times)
|
|
|
| Topic: Color and Size of a Custom Figure |
|---|
| Color and Size of a Custom Figure [message #769611] |
Thu, 22 December 2011 07:12 |
 |
Missing name Mising name Messages: 15 Registered: December 2011 |
Junior Member |
|
|
Hello,
new in Eugenia and the whole GMF stuff i am trying to build a graphical editor.
In my model i am using a custom figure as u can see in the following code snippet:
@gmf.node(label="name", tool.name="MergeData", color="255,100,0",
figure="org.eclipse.epsilon.eugenia.examples.flowchart.diagram.figures.DiamondFigure")
class MergeDiamond {
@gmf.affixed(foo="bar")
ref InPort[1..3] inPort;
@gmf.affixed(foo="bar")
ref OutPort[1] outPort;
}
In the corresponding ECore2GMF.eol i am trying to fix its size:
var mergeDiamond = GmfGraph!CustomFigure.all.selectOne(r|r.name = "MergeDiamondFigure");
if (mergeDiamond.isDefined()) {
var label = mergeDiamond.children.selectOne(r|r.name = "MergeDiamondLabelFigure");
label.text = "";
var fixSize = new GmfGraph!Dimension;
fixSize.dx = 41;
fixSize.dy = 41;
mergeDiamond.maximumSize = fixSize;
var fixSize2 = new GmfGraph!Dimension;
fixSize2.dx = 40;
fixSize2.dy = 40;
mergeDiamond.minimumSize = fixSize2;
}
Here is the code of the generated .gmfgraph:
<descriptors
name="MergeDiamondFigure">
<actualFigure
xsi:type="gmfgraph:CustomFigure"
name="MergeDiamondFigure"
qualifiedClassName="org.eclipse.epsilon.eugenia.examples.flowchart.diagram.figures.DiamondFigure">
<backgroundColor
xsi:type="gmfgraph:RGBColor"
red="255"
green="100"/>
<maximumSize
dx="41"
dy="41"/>
<minimumSize
dx="40"
dy="40"/>
<children
xsi:type="gmfgraph:Label"
name="MergeDiamondLabelFigure"
text=""/>
</actualFigure>
<accessors
accessor="getFigureMergeDiamondLabelFigure"
figure="//@figures.0/@descriptors.11/@actualFigure/@children.0"/>
</descriptors>
But what i thought i would see is not what i did get Sad
1. The custom figure stays white
2. I still can resize it greater than specified maxsize
A similar question for 2. (Is it possible to avoid resizing a figure during its creation and after it?) was asked in another thread, but following the link there i still didn't get an answer to this question and the other two asked there.
I can't post the link cause its my first posting here. So here is the topic and message-id of the thread: Problem with nodes affixed to an ellipse [message #658658]
So, my questions are:
1. Why am i not able to colorize the custom figure?
2. Why is it possible to resize it bigger then given maxsize?
3. Do i have to alter the generated diagram-code for creating the affixed Ports in the same Moment the Diamondfigure was created as in aforementioned thread described?
Thanks in advance.
Wolly
|
|
|
| Topic: Advice Binding for specialization |
|---|
| Advice Binding for specialization [message #768507] |
Tue, 20 December 2011 04:25 |
Sarika Sinha Messages: 33 Registered: February 2010 Location: Bangalore, India |
Member |
|
|
Hi,
I am new to gmf and I have created a specializationType, and want to provide an adviceBinding for getBeforeCreateCommand. The problem is that there is already an adviceBinding with inheritance='all" for it's parent type. How to override this ?
If I add an adviceBinding, Both the advicebinding is executed.First the parent and then the one specified by me.
I tried controlling it in edithelper class . but have not succeded.
Can anyone help urgently as to how this can be done?
Sarika Sinha
WTP Programmer
Source Editing
|
|
|
| Topic: Tagging model elements using toolbar |
|---|
| Tagging model elements using toolbar [message #761433] |
Tue, 06 December 2011 08:25 |
Frederik.Gailly Messages: 2 Registered: December 2011 |
Junior Member |
|
|
Hi,
I am developing a modeling tool which must make it easier to annotate the elements of my diagram with some tags that are available in the tool bar. For every tag I have added a creation tool to my gmfTool model. When the modeler drags one of the tools to an entity the corresponding tag must be added to the entity in a similar way that stereotypes are added to an entity.
The problems that I am facing are:
- I cannot hard code a value when I use a feature label mapping
- I have a added the tags to a compartment. However because this compartment is used in combination with different children reference in my gmfmap, the model creates a compartment for every tag.
Thank you
|
|
|
| Topic: GMF Runtime Exception |
|---|
| GMF Runtime Exception [message #761381] |
Tue, 06 December 2011 06:40 |
vinny503 Mising name Messages: 156 Registered: August 2011 |
Senior Member |
|
|
Hi All,
I have created GMF Projects in Eclipse 3.6.1 version....projects are omsbuilder, omsbuilder.diagram and omsbuilder.edit. When I tried to run in Eclipse 3.7.1 version I get the runtime exception. Please find the attached log file.
Regards,
vinay
|
|
|
| Topic: How to add xxx.xxx_diagram as navigator content in GMF plugin.xml |
|---|
| How to add xxx.xxx_diagram as navigator content in GMF plugin.xml [message #759381] |
Mon, 28 November 2011 09:01 |
vinny503 Mising name Messages: 156 Registered: August 2011 |
Senior Member |
|
|
Hi,
In my RCP Application, I am trying to view xxx.xxx_diagram file as navigator content....As per my understanding, it can be added in Extensions tab of plugin.xml using org.eclipse.ui.navigator.navigatorContent plugin...But I am not sure how exactly this can be done...Please let me know if anyone has idea on this.
Regards,
Vinay
|
|
|
| Topic: Use of xxx.diagram.navigator package classes in GMF |
|---|
|
| Topic: Resizable content in Compartment with ListLayout set to true |
|---|
| Resizable content in Compartment with ListLayout set to true [message #758752] |
Thu, 24 November 2011 08:36 |
Ralph Gerbig Messages: 325 Registered: November 2009 |
Senior Member |
|
|
Hi all,
I try to do something like swimlanes in a pool which can be resized. In order to reach this I added a ResizableShapeEditPolicy to the contained element. This makes it showing resize handles.
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableShapeEditPolicy());
In the EditPolicy of the containing compartment I did override the getCommand method with this:
if (request instanceof ChangeBoundsRequest){
ChangeBoundsRequest req = (ChangeBoundsRequest)request;
ContainedEditPart part = (ContainedEditPart)req.getEditParts().get(0);
Dimension newSize = model.getSize();
newSize.height = newSize.height + req.getSizeDelta().height;
newSize.height = newSize.width + req.getSizeDelta().width;
SetBoundsCommand sbc = new SetBoundsCommand(model.getEditingDomain(), "Resize Containee", new EObjectAdapter((View)part.getModel()), newSize);
return new ICommandProxy(sbc);
This executes but the contained editpart is not horizontally stretching and resized to a very small size. No matter how huge I resize it.
Thanks,
Ralph
|
|
|
| Topic: How to know the size of the Diagram |
|---|
|
| Topic: Link/connection is gone..!!!! |
|---|
|
| Topic: Submissions for EclipseCon |
|---|
|
| Topic: Property window is getting updated with the latest node dragged and dropped on the GMF editor |
|---|
|
| Topic: Mapping of Ecore with packages |
|---|
|
| Topic: PopUp window appears before the GMF Editor comes up |
|---|
| PopUp window appears before the GMF Editor comes up [message #757097] |
Wed, 16 November 2011 08:53 |
vinny503 Mising name Messages: 156 Registered: August 2011 |
Senior Member |
|
|
Hi,
I am trying to implement a pop up window when a node is dragged and dropped on to the editor, I am able to do that but it appears twice even before the GMF Editor comes up....!!
I am having the popup window class in xxx.diagram.edit.parts package and invoking that in xxxFigure inner class of xxxEditPart.java
Sample code shown below, I have highlighted the added code to the xxxFigure() constructor and InputDialog is my popup window class
-------sample code--------
/**
* @generated
*/
public xxxFigure() {
this.setCornerDimensions(new Dimension(getMapMode().DPtoLP( ,
getMapMode().DPtoLP( ));
this.setBackgroundColor(COMP_Color);
this.setBorder(new MarginBorder(getMapMode().DPtoLP(5),
getMapMode().DPtoLP(5), getMapMode().DPtoLP(5),
getMapMode().DPtoLP(5)));
Shell shell = new Shell();
int var = 100;
dialog = new InputDialog(shell,var);
dialog.open();
createContents();
this.setForegroundColor(COMP_Color);
}
I am not able to resolve this...Does anyone have the idea ??
Thanks,
Vinay
|
|
|
| Topic: Combine two ecore Models |
|---|
| Combine two ecore Models [message #756868] |
Tue, 15 November 2011 06:52 |
Willi Messages: 13 Registered: October 2011 |
Junior Member |
|
|
Hello together,
i have the following problem. I have two refering ecore files and i'm facing some problems when i try to build a diagram editor.
The Situation is the following:
A Component (File A) have some Resources (File A) the resources refer to a EntityRep (File B). The diagram element is the component.
Now i can't use a top node reference for EntityRep because it is not a child of component. When the attribute containment from the eReference (resource-->entityRep is set to true it is only possible to set the them inside the resource node.
How must the references changed or the properties set to make it possible to set the entityRep node outside the resource node?
I hope this is somehow reasonable.
regards willi
|
|
|
| Topic: importing swt plugin for xxx project in GMF |
|---|
| importing swt plugin for xxx project in GMF [message #756788] |
Tue, 15 November 2011 00:59 |
vinny503 Mising name Messages: 156 Registered: August 2011 |
Senior Member |
|
|
Hi All,
As I have created a class that creates a widget using SWT plugin but When I add this class to my xxx.diagram project it works fine but when I add this to xxx project it wont... why it requires to import in xxx project but not in xxx.diagram project ??
Thanks,
Vinay
|
|
|
| Topic: how to change the transition arrow? |
|---|
|
| Topic: How to install custom subclass of OpenEditPolicy for editpart in GMF |
|---|
|
| Topic: Correct way to handle copy/paste from a View into a GraphicalEditor |
|---|
| Correct way to handle copy/paste from a View into a GraphicalEditor [message #755915] |
Thu, 10 November 2011 02:53 |
Lior Messages: 17 Registered: February 2011 |
Junior Member |
|
|
We're developing an application in which we handle local copy/pastes within the diagram by using the extension point org.eclipse.gmf.runtime.emf.clipboard.core.clipboardSupport
Copy/Paste events of resources in views are handled using a handler with the commandId org.eclipse.ui.edit.copy/paste
My question is , what's the correct way of handling copy/paste events between the diagram (or any GraphicalEditor for that matter) and other views in the application?
Currently, I was managed to solve it programatically, putting this code in the DiagramEditor initialization method:
IActionBars actionBars = site.getActionBars();
EditPartViewer diagramGraphicalViewer = getDiagramGraphicalViewer();
actionBars.setGlobalActionHandler(GEFActionConstants.PASTE, new PasteMethodNodeAction(clipboard,diagramGraphicalViewer));
But it overrides the other paste listeners of the Editor and generally interrupts our design.
Any ideas will be welcome
|
|
|
| Topic: no live validation pop-up window in RCP generated product |
|---|
| no live validation pop-up window in RCP generated product [message #755693] |
Wed, 09 November 2011 05:35 |
g mouch Messages: 14 Registered: December 2010 |
Junior Member |
|
|
When I launch my RCP Eclipse Application through Eclipse, each time an audit rule is violated a window appears and gives me the reason and the action is undone.
When I deploy my application as a stand-alone eclipse product, each time a rule is violated the action is also not permitted but no windows appears.
does anyone know why is this happening and help me to fix it?
thanks.
|
|
|