Update of /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editormenu
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31105/java/org/objectstyle/wolips/componenteditor/editormenu
Modified Files:
SwitchToApiEditorActionDelegate.java
SwitchToHtmlEditorActionDelegate.java
SwitchToJavaEditorActionDelegate.java
SwitchToWodEditorActionDelegate.java
Added Files:
SwitchToPreviewActionDelegate.java
AbstractSwitchToActionDelegate.java
Log Message:
reenable componenteditor menu i.e switch to html with command alt 2
--- NEW FILE: SwitchToPreviewActionDelegate.java ---
/*
* ====================================================================
*
* The ObjectStyle Group Software License, Version 1.0
*
* Copyright (c) 2006 The ObjectStyle Group and individual authors of the
* software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: 1.
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. 2. Redistributions in
* binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution. 3. The end-user documentation
* included with the redistribution, if any, must include the following
* acknowlegement: "This product includes software developed by the ObjectStyle
* Group (http://objectstyle.org/)." Alternately, this acknowlegement may
* appear in the software itself, if and wherever such third-party
* acknowlegements normally appear. 4. The names "ObjectStyle Group" and
* "Cayenne" must not be used to endorse or promote products derived from this
* software without prior written permission. For written permission, please
* contact [email protected]. 5. Products derived from this software may
* not be called "ObjectStyle" nor may "ObjectStyle" appear in their names
* without prior written permission of the ObjectStyle Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* OBJECTSTYLE GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many individuals
* on behalf of the ObjectStyle Group. For more information on the ObjectStyle
* Group, please see <http://objectstyle.org/> .
*
*/
package org.objectstyle.wolips.componenteditor.editormenu;
import org.eclipse.jface.action.IAction;
import org.objectstyle.wolips.componenteditor.editor.ComponentEditor;
public class SwitchToPreviewActionDelegate extends AbstractSwitchToActionDelegate {
public SwitchToPreviewActionDelegate() {
super();
}
public void run(IAction action) {
ComponentEditor componentEditor = this.getComponentEditor();
if(componentEditor != null) {
componentEditor.switchToPreview();
}
}
}
--- NEW FILE: AbstractSwitchToActionDelegate.java ---
/*
* ====================================================================
*
* The ObjectStyle Group Software License, Version 1.0
*
* Copyright (c) 2006 The ObjectStyle Group and individual authors of the
* software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: 1.
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. 2. Redistributions in
* binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution. 3. The end-user documentation
* included with the redistribution, if any, must include the following
* acknowlegement: "This product includes software developed by the ObjectStyle
* Group (http://objectstyle.org/)." Alternately, this acknowlegement may
* appear in the software itself, if and wherever such third-party
* acknowlegements normally appear. 4. The names "ObjectStyle Group" and
* "Cayenne" must not be used to endorse or promote products derived from this
* software without prior written permission. For written permission, please
* contact [email protected]. 5. Products derived from this software may
* not be called "ObjectStyle" nor may "ObjectStyle" appear in their names
* without prior written permission of the ObjectStyle Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* OBJECTSTYLE GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many individuals
* on behalf of the ObjectStyle Group. For more information on the ObjectStyle
* Group, please see <http://objectstyle.org/> .
*
*/
package org.objectstyle.wolips.componenteditor.editormenu;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IEditorActionDelegate;
import org.eclipse.ui.IEditorPart;
import org.objectstyle.wolips.componenteditor.editor.ComponentEditor;
public abstract class AbstractSwitchToActionDelegate implements
IEditorActionDelegate {
private ComponentEditor componentEditor;
public void setActiveEditor(IAction action, IEditorPart targetEditor) {
if (targetEditor != null && targetEditor instanceof ComponentEditor) {
componentEditor = (ComponentEditor) targetEditor;
} else {
componentEditor = null;
}
}
public void selectionChanged(IAction action, ISelection selection) {
return;
}
public ComponentEditor getComponentEditor() {
return componentEditor;
}
}
Index: SwitchToApiEditorActionDelegate.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editormenu/SwitchToApiEditorActionDelegate.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- SwitchToApiEditorActionDelegate.java 2 Oct 2005 14:33:55 -0000 1.1
+++ SwitchToApiEditorActionDelegate.java 26 Jan 2006 08:13:36 -0000 1.2
@@ -3,7 +3,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2005 The ObjectStyle Group and individual authors of the
+ * Copyright (c) 2005 - 2006 The ObjectStyle Group and individual authors of the
* software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -44,32 +44,19 @@
package org.objectstyle.wolips.componenteditor.editormenu;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.objectstyle.wolips.componenteditor.ComponenteditorPlugin;
import org.objectstyle.wolips.componenteditor.editor.ComponentEditor;
-public class SwitchToApiEditorActionDelegate implements IEditorActionDelegate {
+public class SwitchToApiEditorActionDelegate extends AbstractSwitchToActionDelegate {
public SwitchToApiEditorActionDelegate() {
super();
}
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- // nothing to do
- }
-
public void run(IAction action) {
- ComponentEditor componentEditor = ComponenteditorPlugin.getDefault().getActiveComponentEditor();
+ ComponentEditor componentEditor = this.getComponentEditor();
if(componentEditor != null) {
componentEditor.switchToApi();
}
}
-
- public void selectionChanged(IAction action, ISelection selection) {
- // nothing to do
- }
-
}
Index: SwitchToHtmlEditorActionDelegate.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editormenu/SwitchToHtmlEditorActionDelegate.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- SwitchToHtmlEditorActionDelegate.java 2 Oct 2005 14:33:55 -0000 1.1
+++ SwitchToHtmlEditorActionDelegate.java 26 Jan 2006 08:13:36 -0000 1.2
@@ -3,7 +3,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2005 The ObjectStyle Group and individual authors of the
+ * Copyright (c) 2005 - 2006 The ObjectStyle Group and individual authors of the
* software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -44,32 +44,20 @@
package org.objectstyle.wolips.componenteditor.editormenu;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.objectstyle.wolips.componenteditor.ComponenteditorPlugin;
import org.objectstyle.wolips.componenteditor.editor.ComponentEditor;
-public class SwitchToHtmlEditorActionDelegate implements IEditorActionDelegate {
+public class SwitchToHtmlEditorActionDelegate extends
+ AbstractSwitchToActionDelegate {
public SwitchToHtmlEditorActionDelegate() {
super();
}
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- // nothing to do
- }
-
public void run(IAction action) {
- ComponentEditor componentEditor = ComponenteditorPlugin.getDefault().getActiveComponentEditor();
- if(componentEditor != null) {
+ ComponentEditor componentEditor = this.getComponentEditor();
+ if (componentEditor != null) {
componentEditor.switchToHtml();
}
-
- }
- public void selectionChanged(IAction action, ISelection selection) {
- // nothing to do
}
-
}
Index: SwitchToJavaEditorActionDelegate.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editormenu/SwitchToJavaEditorActionDelegate.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- SwitchToJavaEditorActionDelegate.java 2 Oct 2005 14:33:55 -0000 1.1
+++ SwitchToJavaEditorActionDelegate.java 26 Jan 2006 08:13:36 -0000 1.2
@@ -3,7 +3,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2005 The ObjectStyle Group and individual authors of the
+ * Copyright (c) 2005 - 2006 The ObjectStyle Group and individual authors of the
* software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -44,32 +44,20 @@
package org.objectstyle.wolips.componenteditor.editormenu;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.objectstyle.wolips.componenteditor.ComponenteditorPlugin;
import org.objectstyle.wolips.componenteditor.editor.ComponentEditor;
-public class SwitchToJavaEditorActionDelegate implements IEditorActionDelegate {
+public class SwitchToJavaEditorActionDelegate extends
+ AbstractSwitchToActionDelegate {
public SwitchToJavaEditorActionDelegate() {
super();
}
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- // nothing to do
- }
-
public void run(IAction action) {
- ComponentEditor componentEditor = ComponenteditorPlugin.getDefault().getActiveComponentEditor();
- if(componentEditor != null) {
+ ComponentEditor componentEditor = this.getComponentEditor();
+ if (componentEditor != null) {
componentEditor.switchToJava();
}
-
- }
- public void selectionChanged(IAction action, ISelection selection) {
- // nothing to do
}
-
}
Index: SwitchToWodEditorActionDelegate.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editormenu/SwitchToWodEditorActionDelegate.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- SwitchToWodEditorActionDelegate.java 2 Oct 2005 14:33:55 -0000 1.1
+++ SwitchToWodEditorActionDelegate.java 26 Jan 2006 08:13:36 -0000 1.2
@@ -3,7 +3,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2005 The ObjectStyle Group and individual authors of the
+ * Copyright (c) 2005 - 2006 The ObjectStyle Group and individual authors of the
* software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -44,32 +44,20 @@
package org.objectstyle.wolips.componenteditor.editormenu;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.objectstyle.wolips.componenteditor.ComponenteditorPlugin;
import org.objectstyle.wolips.componenteditor.editor.ComponentEditor;
-public class SwitchToWodEditorActionDelegate implements IEditorActionDelegate {
+public class SwitchToWodEditorActionDelegate extends
+ AbstractSwitchToActionDelegate {
public SwitchToWodEditorActionDelegate() {
super();
}
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- // nothing to do
- }
-
public void run(IAction action) {
- ComponentEditor componentEditor = ComponenteditorPlugin.getDefault().getActiveComponentEditor();
- if(componentEditor != null) {
+ ComponentEditor componentEditor = this.getComponentEditor();
+ if (componentEditor != null) {
componentEditor.switchToWod();
}
-
- }
- public void selectionChanged(IAction action, ISelection selection) {
- // nothing to do
}
-
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.