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 224054 Details for
Bug 395253
Add EMFStore History browser
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.
[patch]
added handler for historyview
historyview.patch (text/plain), 4.67 KB, created by
Johannes Faltermeier
on 2012-11-28 08:36:22 EST
(
hide
)
Description:
added handler for historyview
Filename:
MIME Type:
Creator:
Johannes Faltermeier
Created:
2012-11-28 08:36:22 EST
Size:
4.67 KB
patch
obsolete
>diff --git a/ECP2/org.eclipse.emf.ecp.emfstore.ui/icons/historyview.png b/ECP2/org.eclipse.emf.ecp.emfstore.ui/icons/historyview.png >new file mode 100644 >index 0000000..0f9ed4d >--- /dev/null >+++ b/ECP2/org.eclipse.emf.ecp.emfstore.ui/icons/historyview.png >Binary files differ >diff --git a/ECP2/org.eclipse.emf.ecp.emfstore.ui/plugin.xml b/ECP2/org.eclipse.emf.ecp.emfstore.ui/plugin.xml >index 01139e5..cf69608 100644 >--- a/ECP2/org.eclipse.emf.ecp.emfstore.ui/plugin.xml >+++ b/ECP2/org.eclipse.emf.ecp.emfstore.ui/plugin.xml >@@ -40,6 +40,10 @@ > id="org.eclipse.emf.ecp.emfstore.ui.revertAllOperations" > name="Revert"> > </command> >+ <command >+ id="org.eclipse.emf.ecp.emfstore.ui.showHistoryView" >+ name="showHistoryView"> >+ </command> > </extension> > <extension > point="org.eclipse.ui.menus"> >@@ -162,6 +166,30 @@ > </and> > </visibleWhen> > </command> >+ <command >+ commandId="org.eclipse.emf.ecp.emfstore.ui.showHistoryView" >+ icon="icons/historyview.png" >+ label="Show Historyview" >+ style="push" >+ tooltip="Shows the HistoryView"> >+ <visibleWhen >+ checkEnabled="false"> >+ <and> >+ <count >+ value="1"> >+ </count> >+ <iterate> >+ <instanceof >+ value="org.eclipse.emf.ecp.core.ECPProject"> >+ </instanceof> >+ <test >+ property="org.eclipse.emf.ecp.core.project.providerName" >+ value="org.eclipse.emf.ecp.emfstore.provider"> >+ </test> >+ </iterate> >+ </and> >+ </visibleWhen> >+ </command> > </menuContribution> > <menuContribution > locationURI="popup:org.eclipse.emf.ecp.ui.ModelRepositoriesView?after=additions"> >@@ -283,6 +311,23 @@ > class="org.eclipse.emf.ecp.emfstore.internal.ui.handler.RevertAllOperationsHandler" > commandId="org.eclipse.emf.ecp.emfstore.ui.revertAllOperations"> > </handler> >+ <handler >+ class="org.eclipse.emf.ecp.emfstore.internal.ui.handler.ShowHistoryHandler" >+ commandId="org.eclipse.emf.ecp.emfstore.ui.showHistoryView"> >+ <enabledWhen> >+ <with >+ variable="selection"> >+ <iterate >+ ifEmpty="false" >+ operator="or"> >+ <test >+ property="org.eclipse.emf.ecp.emfstore.ui.testers.isShared" >+ value="true"> >+ </test> >+ </iterate> >+ </with> >+ </enabledWhen> >+ </handler> > </extension> > <extension > point="org.eclipse.ui.decorators"> >diff --git a/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/handler/ShowHistoryHandler.java b/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/handler/ShowHistoryHandler.java >new file mode 100644 >index 0000000..3b923e9 >--- /dev/null >+++ b/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/handler/ShowHistoryHandler.java >@@ -0,0 +1,32 @@ >+package org.eclipse.emf.ecp.emfstore.internal.ui.handler; >+ >+import org.eclipse.emf.ecp.emfstore.core.internal.EMFStoreProvider; >+import org.eclipse.emf.ecp.spi.core.InternalProject; >+import org.eclipse.emf.emfstore.client.model.ProjectSpace; >+import org.eclipse.emf.emfstore.client.ui.controller.UIShowHistoryController; >+ >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.ui.handlers.HandlerUtil; >+ >+public class ShowHistoryHandler extends AbstractHandler { >+ >+ /* >+ * (non-Javadoc) >+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) >+ */ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ InternalProject project = (InternalProject) ((IStructuredSelection) HandlerUtil.getCurrentSelection(event)) >+ .getFirstElement(); >+ if (project == null) { >+ return null; >+ } >+ ProjectSpace projectSpace = EMFStoreProvider.INSTANCE.getProjectSpace(project); >+ if (projectSpace != null) { >+ new UIShowHistoryController(HandlerUtil.getActiveShell(event), projectSpace).execute(); >+ } >+ return null; >+ } >+} >\ No newline at end of file
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 Diff
View Attachment As Raw
Flags:
eneufeld
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 395253
: 224054