|
|
Re: Editor dirty handling [message #911364 is a reply to message #911170] |
Tue, 11 September 2012 13:04 |
Dennis Melzer Messages: 244 Registered: July 2009 |
Senior Member |
|
|
First time all my Features and Commands works well. But after the first saving the dirty handling is buggy.
Steps:
1. Move a Shape
2. Saving
3. Click ContextButtonPad with follow Feature
public class OpenPropertyViewFeature extends AbstractCustomFeature
{
public OpenPropertyViewFeature (IFeatureProvider fp)
{
super(fp);
}
@Override
public boolean canExecute(ICustomContext context)
{
return true;
}
@Override
public void execute(ICustomContext context)
{
try
{
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().showView("org.eclipse.ui.views.PropertySheet");
catch (PartInitException e)
{
}
}
@Override
public boolean hasDoneChanges()
{
return false;
}
@Override
public boolean canUndo(IContext context)
{
return false;
}
The Editor is dirty, because savedCommand = Move Shape Command and commandStack.getUndoCommand() is null.
So savedCommand != commandStack.getUndoCommand() is true
And the Undo/Redo Handling (e.g Toolbar action) is buggy too.
[Updated on: Tue, 11 September 2012 13:08] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03894 seconds