Author: akazakov
Date: 2008-08-26 10:05:50 -0400 (Tue, 26 Aug 2008)
New Revision: 9899
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRefactoringHandler.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-08-26 13:11:58 UTC (rev
9898)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-08-26 14:05:50 UTC (rev
9899)
@@ -553,5 +553,40 @@
class="org.jboss.tools.seam.ui.search.SeamQueryParticipant"
id="org.jboss.tools.seam.ui.search.SeamQueryParticipant" />
</extension>
-
-</plugin>
+
+<!-- Refactorng -->
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#CompilationUnitEditorContext?after=org.eclipse.jdt.ui.refactoring.menu">
+ <menu
+ id="java.editor.seam.popup.menu"
+ label="Seam">
+ <command
+ commandId="org.jboss.tools.seam.ui.refactoring.component"
+ id="org.jboss.tools.seam.ui.open.component.submenu"
+ label="Refactor Seam Component"
+ style="push"
+ tooltip="Refactor Seam Component">
+ </command>
+ </menu>
+ </menuContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.jboss.tools.seam.ui.refactoring.component"
+ description="Seam Refactoring"
+ name="Seam Refactoring">
+ </command>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.jboss.tools.seam.ui.refactoring.component"
+
class="org.jboss.tools.seam.ui.refactoring.SeamComponentRefactoringHandler"/>
+ </extension>
+
+</plugin>
\ No newline at end of file
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRefactoringHandler.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRefactoringHandler.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRefactoringHandler.java 2008-08-26
14:05:50 UTC (rev 9899)
@@ -0,0 +1,42 @@
+ /*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.ui.refactoring;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * @author Alexey Kazakov
+ *
+ */
+public class SeamComponentRefactoringHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchPart part = HandlerUtil.getActivePart(event);
+ IEditorPart editor = HandlerUtil.getActiveEditor(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+
+// Object context = event.getApplicationContext();
+// if (context instanceof IEvaluationContext) {
+// IEvaluationContext appContext = (IEvaluationContext) context;
+//
+// }
+ return null;
+ }
+}
\ No newline at end of file