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
Sunday, November 12, 2006
Document Provider
The essence of document provider in picture of loading, unloading resources, setting save rules, and enabling editors dirty.
For each editor, the document generated and the editor input are unassumingly critical. Since inception, the design for these two entities have been been exceptional and intuitive.
The editor is played by the document provided by the document provider. The document provider takes care of linking it with the appropriate editing domain in case the editor is transacting with an EMF model or even the ResourceSet.
The editorInput being fed to the editor as input is understood rather compiled to form the document.
More in place a little later...
For each editor, the document generated and the editor input are unassumingly critical. Since inception, the design for these two entities have been been exceptional and intuitive.
The editor is played by the document provided by the document provider. The document provider takes care of linking it with the appropriate editing domain in case the editor is transacting with an EMF model or even the ResourceSet.
The editorInput being fed to the editor as input is understood rather compiled to form the document.
More in place a little later...
Subscribe to:
Posts (Atom)