Thursday, May 31, 2007
Wednesday, May 30, 2007
JAX India Conference
An update on the JAX India conference! Lot of crowd but not too much of technical involvements.
Made a presentation on Modeling Visualization approches!! Didn't get to know how well it was received but then met a lot of other people involved in eclipse development environments!!
Made a presentation on Modeling Visualization approches!! Didn't get to know how well it was received but then met a lot of other people involved in eclipse development environments!!
Thursday, May 03, 2007
Diagram Context Menu Provider contribution
Certain menus(popup contribution, toolbar contribution) can be removed from a GMF editor by adding contributions to the existing extension point contribution.
For example on the diagram right click, most often you'd see Add option with a list of menus to choose from namely Note, Text, Ellipse, Rectangle etc.
The contribution point would be like
...

For example on the diagram right click, most often you'd see Add option with a list of menus to choose from namely Note, Text, Ellipse, Rectangle etc.
The contribution point would be like
...

...
The menu group or popup menu action ids will be available in the plugin.xml of
org.eclipse.gmf.runtime.diagram.ui.providers
Wednesday, April 18, 2007
Gradienting figures with colors
User interfaces are necessarily required to be as polished as a bride! Gradient-ing factors to be pretty crucial especially after the broad usage of Window-XP themes.
GEF, provides its implementation on through the ScaledGraphics implementation. However, the ScaledGraphics is not the only used Graphics implementation; making it difficult for object invocation.
The workaround for this would involve overriding the implementation of setBackgroundPattern. GMF's implementation RenderedMapModeGraphics doesn't serve the purpose as well. The Graphics is always set on the RootLayeredPane. Consequently it would require an implementation of the RootEditpart.
Pattern being SWT.Pattern
GEF, provides its implementation on through the ScaledGraphics implementation. However, the ScaledGraphics is not the only used Graphics implementation; making it difficult for object invocation.
The workaround for this would involve overriding the implementation of setBackgroundPattern. GMF's implementation RenderedMapModeGraphics doesn't serve the purpose as well. The Graphics is always set on the RootLayeredPane. Consequently it would require an implementation of the RootEditpart.
public void setBackgroundPattern(Device dev, float x1, float y1, float x2,float y2, Color color1, Color color2) {if (baseGraphics instanceof SWTGraphics) {
if (pattern != null) {
pattern.dispose();
}
pattern = new Pattern(dev, x1, y1, x2, y2, color1, color2);
baseGraphics.setBackgroundPattern(pattern);
return;
}
if (baseGraphics instanceof RenderedMapModeGraphics) {
((RenderedMapModeGraphics) baseGraphics).setBackgroundPattern(dev, x1,
y1, x2, y2, color1, color2);
return;
}
return;
}
Pattern being SWT.Pattern
Canonical Edit Policies
GMF has this add-on Editpolicy which handles the synchronization between the semantic and view models.
At times, it is evident that the connections being created or elements being created within a composite parent(one apart from the base edit part) do not refresh the model or even the connections. This is because of the difference in implementation from the base editpart ones.
Two methods that may be striking are the
1. refreshSemantic
2. refreshConnections - called from the refreshSemantic
The invocations for these cause refresh real time.
More on Canonical EditPolicies
At times, it is evident that the connections being created or elements being created within a composite parent(one apart from the base edit part) do not refresh the model or even the connections. This is because of the difference in implementation from the base editpart ones.
Two methods that may be striking are the
1. refreshSemantic
2. refreshConnections - called from the refreshSemantic
The invocations for these cause refresh real time.
More on Canonical EditPolicies
Subscribe to:
Posts (Atom)