[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: ApplyAppearanceProperties Action error

I think the problem occurs only when copying FillStyle.

While debugging, the command executed once I added FillStyle in PropertyHandlerEditPolicy as follows:

protected List getStyleExclusionsForCopyAppearance() {
		List exclusions = new ArrayList();
	exclusions.add(NotationPackage.eINSTANCE.getDescriptionStyle());
	exclusions.add(NotationPackage.eINSTANCE.getImageBufferStyle());
	exclusions.add(NotationPackage.eINSTANCE.getFillStyle());
return exclusions;
}

I also had to modify the
FillStyleImpl#
protected static final int TRANSPARENCY_EDEFAULT = -1;
to value <<255>>, since it threw errors when copying shapes to the clipboard (with fillstyle) and no transparency set initially.


This error seems reasonable, since

org.eclipse.awt.AlphaComposite#
private AlphaComposite(int rule, float alpha) {
	if (alpha < 0.0f || alpha > 1.0f) {
	    throw new IllegalArgumentException("alpha value out of range");
	}
	...

is called, when the default transparency is set to -1.


I hope this helps a bit investigating.


Regards Thomas

Am 25.06.2009 14:09, schrieb Thomas Beyer:
Hello GMF-Team,

this issue adresses in my ealier post has not been solved within the
Galileo-release, from what I can tell.

Steps to reproduce:

1. Create a new ecore-diagram (error also occur when using the ecore
diagram editor, that ships with the ecoretools-project).
2. Create two EClass-objects.
3. Modify the background a one to any different color.
4. Try to use "Apply Appearance Properties"-action (at least that's what
its called in the context menu)

Please let me know, if I can be of further help.


Regards Thomas



Am 29.04.2009 19:38, schrieb Thomas Beyer:
Hello community,

I am working with GMF 2.2M6 and corresponding platform plugins.
I cannot use the apply appearance action, since it throws an error on
execution.

This error not only occurs in my rcp, but also in the diagram-editor of
the gmf-runtime and even the ecore diagram editor of the
ecoretools-project.

The fix for Bug 269988 doesn't resolve this problem either.
Unfortunately my stack trace is cut off, where it gets interesting. (see
below) So I don't have a point to start/debug at.

More info:
The notofy changed method doesn't get called in the editparts.
Though the change is being copied after all.
When saving, closing and reopening the file, all changes are applied
appropriately.


Is this a known issue?


TIA & regards Thomas


org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:519)


at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:194)


at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:169)


at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.execute(DiagramAction.java:141)


at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.doRun(DiagramAction.java:103)


at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:359)


at org.eclipse.gmf.runtime.common.ui.action.ActionManager$1.run(ActionManager.java:225)


at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(ActionManager.java:223)


at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.runWithEvent(AbstractActionHandler.java:377)


at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)


at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)


at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)


at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2393) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)


at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)


at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)


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:368)


at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284) at org.eclipse.equinox.launcher.Main.main(Main.java:1260) Caused by: java.lang.IllegalStateException: Transaction is already closing at org.eclipse.emf.transaction.impl.TransactionImpl.rollback(TransactionImpl.java:527)


at org.eclipse.emf.workspace.AbstractEMFOperation.rollback(AbstractEMFOperation.java:630)


at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:187)


at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)


.... 37 more