Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 265278 Details for
Bug 507302
Undoing in an AbstractFXEditor does not update dirty state
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
editor implementation used to generate the bug
file_507302.txt (text/plain), 2.11 KB, created by
Victor Johnsson
on 2016-11-09 10:15:18 EST
(
hide
)
Description:
editor implementation used to generate the bug
Filename:
MIME Type:
Creator:
Victor Johnsson
Created:
2016-11-09 10:15:18 EST
Size:
2.11 KB
patch
obsolete
>package main; > >import org.eclipse.core.runtime.IProgressMonitor; >import org.eclipse.gef.common.adapt.AdapterKey; >import org.eclipse.gef.mvc.examples.logo.MvcLogoExample; >import org.eclipse.gef.mvc.examples.logo.MvcLogoExampleModule; >import org.eclipse.gef.mvc.examples.logo.MvcLogoExampleViewersComposite; >import org.eclipse.gef.mvc.fx.ui.MvcFxUiModule; >import org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditor; >import org.eclipse.gef.mvc.fx.viewer.IViewer; >import org.eclipse.ui.IEditorInput; >import org.eclipse.ui.IEditorSite; >import org.eclipse.ui.PartInitException; > >import com.google.inject.Guice; >import com.google.inject.util.Modules; > >import javafx.scene.Scene; > >public class LogoEditor extends AbstractFXEditor { > > public static final String ID = "dirty-state.editor"; > private static int instanceNbr = 0; > > public LogoEditor() { > super(Guice.createInjector(Modules.override(new MvcLogoExampleModule()).with(new MvcFxUiModule()))); > } > > @Override > public void init(final IEditorSite site, final IEditorInput input) throws PartInitException { > super.init(site, input); > getContentViewer().getContents().setAll(MvcLogoExample.createDefaultContents()); > getPaletteViewer().getContents().setAll(MvcLogoExample.createPaletteContents()); > this.setPartName("Logo" + instanceNbr++); > } > > protected IViewer getPaletteViewer() { > return getDomain().getAdapter(AdapterKey.get(IViewer.class, MvcLogoExampleModule.PALETTE_VIEWER_ROLE)); > } > > @Override > protected void hookViewers() { > // build viewers composite > MvcLogoExampleViewersComposite viewersComposite = new MvcLogoExampleViewersComposite(getContentViewer(), > getPaletteViewer()); > // create scene and populate canvas > getCanvas().setScene(new Scene(viewersComposite.getComposite())); > } > > @Override > public void doSave(IProgressMonitor monitor) { > setDirty(false); > } > > @Override > public void doSaveAs() { > } > > @Override > public boolean isSaveAsAllowed() { > return false; > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 507302
:
265277
| 265278