Commit 25cba330 authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

add sadepublish popup menu entry to navigator

git-svn-id: https://textgridlab.org/svn/textgrid/trunk/lab/sadepublish@12637 7c539038-3410-0410-b1ec-0f2a7bf1c452
parent 6e5fe48a
......@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
......@@ -20,8 +20,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
......
#Sun Sep 18 15:02:25 CEST 2011
#Wed Apr 11 18:45:50 CEST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
......
......@@ -6,6 +6,9 @@ Bundle-Version: 1.0.0.qualifier
Bundle-Activator: info.textgrid.lab.sadepublish.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
info.textgrid.lab.authn;bundle-version="0.0.2"
info.textgrid.lab.authn;bundle-version="0.0.2",
org.eclipse.core.expressions;bundle-version="3.4.300",
info.textgrid.lab.core.model;bundle-version="0.1.2",
info.textgrid.lab.core.swtutils;bundle-version="1.0.2"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
......@@ -57,6 +57,36 @@
tooltip="Publish TextGrid Objects to Sade">
</command>
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any?after=additions">
<command
commandId="info.textgrid.lab.sadepublish.showSadePublish"
icon="icons/025-publiziere-Objekt.gif"
style="push">
<visibleWhen
checkEnabled="true">
<iterate>
<and>
<test
forcePluginActivation="true"
property="info.textgrid.lab.sadepublish.tester.IsPublishableObject"
value="true">
</test>
</and>
</iterate>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
class="info.textgrid.lab.sadepublish.tester.IsPublishableObject"
id="info.textgrid.lab.sadepublish.tester.IsPublishableObject"
namespace="info.textgrid.lab.sadepublish.tester"
properties="IsPublishableObject"
type="java.lang.Object">
</propertyTester>
</extension>
<!--extension
point="org.eclipse.ui.perspectiveExtensions">
......
......@@ -21,6 +21,7 @@
*/
package info.textgrid.lab.sadepublish;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
......@@ -88,4 +89,9 @@ public class Activator extends AbstractUIPlugin {
StatusManager.getManager().handle(
new Status(IStatus.ERROR, PLUGIN_ID, NLS.bind(message, args)));
}
public static void handleWarning(CoreException e, String string) {
// TODO Auto-generated method stub
}
}
......@@ -29,15 +29,22 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.handlers.HandlerUtil;
public class ShowSadePublishPerspectiveHandler extends AbstractHandler implements IHandler{
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
// test if command was called from navigator
ISelection selection = HandlerUtil.getCurrentSelection(event);
System.out.println("event from spublish" + event.getParameters());
// first reset the perspective...
IWorkbench wb = PlatformUI.getWorkbench();
wb.getActiveWorkbenchWindow().getActivePage().setPerspective(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment