JBoss Tools SVN: r22511 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-06-03 09:13:41 -0400 (Thu, 03 Jun 2010)
New Revision: 22511
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizardPage.java
Log:
https://jira.jboss.org/browse/JBIDE-4918
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2010-06-03 12:21:57 UTC (rev 22510)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2010-06-03 13:13:41 UTC (rev 22511)
@@ -193,10 +193,13 @@
public static String NewConfigurationWizardPage_file_already_exist;
public static String NewConfigurationWizardPage_file_container_must_be_specified;
public static String NewConfigurationWizardPage_file_container_must_exist;
- public static String NewConfigurationWizardPage_file_extension_must_be_cfgxml;
+ public static String NewConfigurationWizardPage_file_extension_should_be_cfgxml;
public static String NewConfigurationWizardPage_file_name;
public static String NewConfigurationWizardPage_file_name_must_be_specified;
public static String NewConfigurationWizardPage_file_name_must_be_valid;
+ public static String NewConfigurationWizardPage_filefile_name;
+ public static String NewConfigurationWizardPage_fileoutside_classpath;
+ public static String NewConfigurationWizardPage_fileshould_pass_configuration;
public static String NewConfigurationWizardPage_hibernate_config_file;
public static String NewConfigurationWizardPage_password;
public static String NewConfigurationWizardPage_project_must_be_writable;
@@ -437,6 +440,7 @@
public static String ConsoleConfigurationTab_create_new;
public static String ConsoleConfigurationTab_setup;
public static String ConsoleConfigurationTabGroup_archive_classpath_entry_does_not_exist;
+
public static String ConsoleConfigurationTabGroup_classpath_must_be_set_or_restored_to_default;
public static String DirectoryBrowseField_filesystem;
public static String DirectoryBrowseField_workspace;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2010-06-03 12:21:57 UTC (rev 22510)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2010-06-03 13:13:41 UTC (rev 22511)
@@ -188,10 +188,13 @@
NewConfigurationWizardPage_file_already_exist=File already exists
NewConfigurationWizardPage_file_container_must_be_specified=File container must be specified
NewConfigurationWizardPage_file_container_must_exist=File container must exist
-NewConfigurationWizardPage_file_extension_must_be_cfgxml=File extension must be "cfg.xml"
+NewConfigurationWizardPage_file_extension_should_be_cfgxml=File extension should be "cfg.xml"
NewConfigurationWizardPage_file_name=Fi&le name:
NewConfigurationWizardPage_file_name_must_be_specified=File name must be specified
NewConfigurationWizardPage_file_name_must_be_valid=File name must be valid
+NewConfigurationWizardPage_filefile_name=hibernate.cfg.xml
+NewConfigurationWizardPage_fileoutside_classpath=Configuration placed outside CLASSPATH will not be available at run-time
+NewConfigurationWizardPage_fileshould_pass_configuration=To load Configuration from ''{0}'' you''ll have to pass file name to Configuration.configure() method
NewConfigurationWizardPage_hibernate_config_file=Hibernate Configuration File (cfg.xml)
NewConfigurationWizardPage_password=&Password:
NewConfigurationWizardPage_project_must_be_writable=Project must be writable
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java 2010-06-03 12:21:57 UTC (rev 22510)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java 2010-06-03 13:13:41 UTC (rev 22511)
@@ -22,17 +22,31 @@
package org.hibernate.eclipse.console.wizards;
import java.io.ByteArrayInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
+import java.lang.reflect.InvocationTargetException;
import java.util.Properties;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
@@ -72,6 +86,7 @@
public ExtendedWizardNewFileCreationPage(String pageName, IStructuredSelection selection) {
super(pageName, selection);
+ setAllowExistingResources(false);
}
boolean firstTime = true;
@@ -82,6 +97,51 @@
firstTime = false;
}
}
+
+ @Override
+ protected boolean validatePage() {
+ if (super.validatePage()){
+ String fileName = getFileName();
+ if (!fileName.endsWith(".cfg.xml") ) { //$NON-NLS-1$
+ setMessage(HibernateConsoleMessages.NewConfigurationWizardPage_file_extension_should_be_cfgxml, WARNING);
+ } else if (!fileName.equals(HibernateConsoleMessages.NewConfigurationWizardPage_filefile_name)){
+ setMessage(NLS.bind(HibernateConsoleMessages.NewConfigurationWizardPage_fileshould_pass_configuration,
+ fileName), WARNING);
+ }
+ IPath path = getContainerFullPath();
+ IContainer container = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
+
+ try {
+ if (container != null && container.getProject().hasNature(JavaCore.NATURE_ID)) {
+ IJavaProject proj = JavaCore.create(container.getProject());
+ IPath projRelPath = container.getProjectRelativePath();
+ IPackageFragmentRoot[] roots;
+
+ roots = proj.getAllPackageFragmentRoots();
+ boolean found = false;
+ for (IPackageFragmentRoot root : roots) {
+ if (root.isArchive()) continue;
+ if (root.getResource() != null && root.getResource().getProjectRelativePath().isPrefixOf(projRelPath)){
+ if (!root.getResource().getProjectRelativePath().equals(projRelPath)){
+ //this is not "src" folder
+ setMessage(NLS.bind(HibernateConsoleMessages.NewConfigurationWizardPage_fileshould_pass_configuration,
+ fileName), WARNING);
+ }
+ found = true;
+ break;
+ }
+ }
+ if (!found){
+ setMessage(HibernateConsoleMessages.NewConfigurationWizardPage_fileoutside_classpath, WARNING);
+ }
+ }
+ } catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().log(e);
+ }
+ return true;
+ }
+ return false;
+ }
}
/**
@@ -122,11 +182,39 @@
* using wizard as execution context.
*/
public boolean performFinish() {
+ final Properties props = new Properties();
+ putIfNotNull(props, Environment.SESSION_FACTORY_NAME, connectionInfoPage.getSessionFactoryName() );
+ putIfNotNull(props, Environment.DIALECT, connectionInfoPage.getDialect() );
+ putIfNotNull(props, Environment.DRIVER, connectionInfoPage.getDriver() );
+ putIfNotNull(props, Environment.URL, connectionInfoPage.getConnectionURL() );
+ putIfNotNull(props, Environment.USER, connectionInfoPage.getUsername() );
+ putIfNotNull(props, Environment.PASS, connectionInfoPage.getPassword() );
+ putIfNotNull(props, Environment.DEFAULT_CATALOG, connectionInfoPage.getDefaultCatalog() );
+ putIfNotNull(props, Environment.DEFAULT_SCHEMA, connectionInfoPage.getDefaultSchema() );
final IFile file = cPage.createNewFile();
- openHibernateCfgXml(file);
-
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException {
+ try {
+ createHibernateCfgXml(file, props, monitor);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ monitor.done();
+ }
+ }
+ };
try {
+ getContainer().run(true, false, op);
+ } catch (InterruptedException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ Throwable realException = e.getTargetException();
+ HibernateConsolePlugin.getDefault().showError(getShell(), HibernateConsoleMessages.NewConfigurationWizard_error, realException);
+ return false;
+ }
+
+ try {
if (connectionInfoPage.isCreateConsoleConfigurationEnabled()) {
confPage.performFinish();
} else {
@@ -159,7 +247,30 @@
}
}
- private void openHibernateCfgXml(final IFile file) {
+ /**
+ * The worker method. It will find the container, create the
+ * file if missing or just replace its contents, and open
+ * the editor on the newly created file.
+ * @param file
+ * @param props
+ */
+ private void createHibernateCfgXml(
+ final IFile file, Properties props, IProgressMonitor monitor)
+ throws CoreException {
+ // create a sample file
+ monitor.beginTask(HibernateConsoleMessages.NewConfigurationWizard_creating + file.getName(), 2);
+ try {
+ InputStream stream = openContentStream(props);
+ if (file.exists() ) {
+ file.setContents(stream, true, true, monitor);
+ } else {
+ file.create(stream, true, monitor);
+ }
+ stream.close();
+ } catch (IOException e) {
+ }
+ monitor.worked(1);
+ monitor.setTaskName(HibernateConsoleMessages.NewConfigurationWizard_open_file_for_editing);
getShell().getDisplay().asyncExec(new Runnable() {
public void run() {
IWorkbenchPage page =
@@ -170,6 +281,7 @@
}
}
});
+ monitor.worked(1);
}
/**
@@ -197,6 +309,32 @@
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.selection = selection;
+ if (!selection.isEmpty()){
+ IJavaProject jproj = null;
+ if (selection.getFirstElement() instanceof IJavaProject) {
+ jproj = (IJavaProject) selection.getFirstElement();
+ }
+ if (selection.getFirstElement() instanceof IProject){
+ try {
+ if (((IProject)selection.getFirstElement()).getNature(JavaCore.NATURE_ID) != null) {
+ jproj = (IJavaProject)((IProject)selection.getFirstElement()).getNature(JavaCore.NATURE_ID);
+ }
+ } catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().log(e);
+ }
+ }
+ if (jproj != null){
+ IPackageFragmentRoot[] roots;
+ try {
+ roots = jproj.getAllPackageFragmentRoots();
+ if (roots.length > 0){
+ this.selection = new StructuredSelection(roots[0]);
+ }
+ } catch (JavaModelException e) {
+ HibernateConsolePlugin.getDefault().log(e);
+ }
+ };
+ }
}
public IWizardPage getNextPage(IWizardPage page) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizardPage.java 2010-06-03 12:21:57 UTC (rev 22510)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizardPage.java 2010-06-03 13:13:41 UTC (rev 22511)
@@ -21,8 +21,6 @@
*/
package org.hibernate.eclipse.console.wizards;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Path;
@@ -315,17 +313,7 @@
updateStatus(HibernateConsoleMessages.NewConfigurationWizardPage_file_name_must_be_valid);
return;
}
- if (!fileName.endsWith(".cfg.xml") ) { //$NON-NLS-1$
- updateStatus(HibernateConsoleMessages.NewConfigurationWizardPage_file_extension_must_be_cfgxml);
- return;
- }
- IFile file = ( (IContainer) container).getFile(new Path(fileName) );
- if(file.exists() ) {
- updateStatus(HibernateConsoleMessages.NewConfigurationWizardPage_file_already_exist);
- return;
- }
-
// TODO: check for driver class availability.
updateStatus(null);
}
15 years, 4 months
JBoss Tools SVN: r22510 - in trunk/jsf/plugins/org.jboss.tools.jsf: META-INF and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-06-03 08:21:57 -0400 (Thu, 03 Jun 2010)
New Revision: 22510
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringActionFactory.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringActionManager.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameDescriptor.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameProcessor.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameRefactoringWizard.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/IRenameDescriptor.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameAction.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameRefactoring.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameUserInterfaceManager.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameUserInterfaceStarter.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/StructuredChanges.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/StructuredTextFileChange.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/view/
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/view/StructuredChangesPreviewViewer.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ComponentUtil.java
Log:
https://jira.jboss.org/browse/JBIDE-5943 - possibility to refactor jsf component attributes names was added.
https://jira.jboss.org/browse/JBIDE-6276 - primary preview was created
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF 2010-06-03 12:20:23 UTC (rev 22509)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF 2010-06-03 12:21:57 UTC (rev 22510)
@@ -47,7 +47,10 @@
org.eclipse.jst.j2ee,
org.eclipse.ui.ide,
org.eclipse.wst.html.core;bundle-version="1.1.300",
- org.eclipse.wst.sse.ui;bundle-version="1.1.102"
+ org.eclipse.wst.sse.ui;bundle-version="1.1.102",
+ org.eclipse.ltk.ui.refactoring,
+ org.eclipse.core.expressions;bundle-version="3.4.100",
+ org.jboss.tools.common.text.ext;bundle-version="3.1.0"
Bundle-Version: 3.1.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2010-06-03 12:20:23 UTC (rev 22509)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2010-06-03 12:21:57 UTC (rev 22510)
@@ -645,4 +645,79 @@
</enablement>
</moveParticipant>
</extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:refactorPopupMenuId">
+ <command
+ commandId="org.eclipse.jdt.ui.edit.text.java.rename.element"
+ label="Re&name"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <reference
+ definitionId="org.jboss.tools.ui.structuredEditor">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ locationURI="menu:refactorMenuId">
+ <command
+ commandId="org.eclipse.jdt.ui.edit.text.java.rename.element"
+ label="Re&name"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <reference
+ definitionId="org.jboss.tools.ui.structuredEditor">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.jboss.tools.jsf.jsf2.refactoring.action.rename.RenameAction"
+ commandId="org.eclipse.jdt.ui.edit.text.java.rename.element">
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editorActions">
+ <editorContribution
+ id="org.jboss.tools.jsf.jsf2.refactor.rename"
+ targetID="org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor">
+ <action
+ class="org.jboss.tools.jsf.jsf2.refactoring.action.rename.RenameAction"
+ definitionId="org.eclipse.jdt.ui.edit.text.java.rename.element"
+ id="org.eclipse.jdt.ui.edit.text.java.rename.element"
+ label="Re&name"
+ style="push">
+ </action>
+ </editorContribution>
+ <editorContribution
+ id="org.jboss.tools.jsf.jsf2.refactor.rename"
+ targetID="org.jboss.tools.jst.jsp.jspeditor.HTMLTextEditor">
+ <action
+ class="org.jboss.tools.jsf.jsf2.refactoring.action.rename.RenameAction"
+ definitionId="org.eclipse.jdt.ui.edit.text.java.rename.element"
+ id="org.eclipse.jdt.ui.edit.text.java.rename.element"
+ label="Re&name"
+ style="push">
+ </action>
+ </editorContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ltk.ui.refactoring.changePreviewViewers">
+ <changePreviewViewer
+ class="org.jboss.tools.jsf.jsf2.refactoring.view.StructuredChangesPreviewViewer"
+ id="org.jboss.tools.jsf.jsf2.refactor.structuredpreview">
+ <enablement>
+ <instanceof
+ value="org.jboss.tools.jsf.jsf2.refactoring.core.StructuredChanges">
+ </instanceof>
+ </enablement>
+ </changePreviewViewer>
+ </extension>
</plugin>
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringActionFactory.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringActionFactory.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringActionFactory.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,74 @@
+package org.jboss.tools.jsf.jsf2.refactoring;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.jboss.tools.jsf.jsf2.refactoring.action.rename.CompositeAttributeRenameDescriptor;
+import org.jboss.tools.jsf.jsf2.refactoring.action.rename.IRenameDescriptor;
+import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
+
+@SuppressWarnings("restriction")
+public class RefactoringActionFactory {
+
+ public static IRenameDescriptor createRenameDescriptor(
+ StructuredTextEditor editorPart) {
+ ISelection selection = editorPart.getEditorSite()
+ .getSelectionProvider().getSelection();
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ if (structuredSelection.size() > 1) {
+ return null;
+ }
+ Object object = structuredSelection.getFirstElement();
+ if (object instanceof IDOMAttr) {
+ return createRenameDescriptor((IDOMAttr) object, editorPart
+ .getTextViewer(), ((IFileEditorInput) editorPart
+ .getEditorInput()).getFile());
+ }
+ }
+ return null;
+ }
+
+ public static IRenameDescriptor createRenameDescriptor(IDOMAttr attr,
+ ISourceViewer sourceViewer, IFile file) {
+ IRenameDescriptor renameDescriptor = null;
+ String uri = createJSF2URIFromPath(file.getParent().getFullPath());
+ if (JSF2ResourceUtil.JSF2_URI_PREFIX.equals(uri)) {
+ return renameDescriptor;
+ }
+ if (!attr.getOwnerElement().getNamespaceURI().trim().equalsIgnoreCase(
+ JSF2ResourceUtil.JSF2_URI_PREFIX)) {
+ return renameDescriptor;
+ }
+ if (!"attribute".equals(attr.getOwnerElement().getLocalName())) { //$NON-NLS-1$
+ return renameDescriptor;
+ }
+ int offset = sourceViewer.getSelectedRange().x;
+ if (offset > attr.getValueRegionStartOffset()
+ && offset < attr.getValueRegionStartOffset()
+ + attr.getValueRegionText().length()) {
+ renameDescriptor = new CompositeAttributeRenameDescriptor(attr, file, uri);
+ }
+ return renameDescriptor;
+ }
+
+ private static String createJSF2URIFromPath(IPath path) {
+ StringBuilder uri = new StringBuilder(""); //$NON-NLS-1$
+ String[] segments = path.segments();
+ if (segments.length > 3) {
+ if (segments[2].equals("resources")) { //$NON-NLS-1$
+ for (int i = 3; i < segments.length; i++) {
+ uri.append("/" + segments[i]); //$NON-NLS-1$
+ }
+ }
+ }
+ uri.insert(0, JSF2ResourceUtil.JSF2_URI_PREFIX);
+ return uri.toString();
+ }
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringActionManager.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringActionManager.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringActionManager.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,73 @@
+package org.jboss.tools.jsf.jsf2.refactoring;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages;
+import org.eclipse.jdt.internal.ui.refactoring.UserInterfaceStarter;
+import org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.jboss.tools.jsf.jsf2.refactoring.action.rename.IRenameDescriptor;
+import org.jboss.tools.jsf.jsf2.refactoring.action.rename.RenameUserInterfaceManager;
+
+@SuppressWarnings("restriction")
+public class RefactoringActionManager {
+
+ public static final String REFACTOR_RENAME_ACTION_ID = "_refactor_rename_action_id"; //$NON-NLS-1$
+
+ private static final RefactoringActionManager instance = new RefactoringActionManager();
+
+ private RefactoringActionManager() {
+
+ }
+
+ public static RefactoringActionManager getManager() {
+ return instance;
+ }
+
+ public boolean checkActionAvailable(String actionID, IDOMNode node) {
+ return getAvailableActionIDs(node).contains(actionID);
+ }
+
+ public boolean checkActionAvailable(String actionID,
+ EvaluationContext context) {
+ return getAvailableActionIDs(context).contains(actionID);
+ }
+
+ public Set<String> getAvailableActionIDs(IDOMNode node) {
+ Set<String> ids = new HashSet<String>();
+ return ids;
+ }
+
+ public Set<String> getAvailableActionIDs(EvaluationContext context) {
+ System.out.println(context.getDefaultVariable());
+ Set<String> ids = new HashSet<String>();
+ return ids;
+ }
+
+ public void renameWithAction(IAction action, IRenameDescriptor descriptor) {
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getShell();
+ if (descriptor == null) {
+ MessageDialog.openInformation(parent,
+ RefactoringMessages.RenameAction_rename,
+ "Refactoring is not available in the current place"); //$NON-NLS-1$
+ return;
+ }
+ descriptor.getRenameRefactoring().setProcessor(
+ descriptor.getRefactoringProcessor());
+ UserInterfaceStarter starter = RenameUserInterfaceManager.getDefault()
+ .getStarter(descriptor.getRenameRefactoring());
+ try {
+ starter.activate(descriptor.getRenameRefactoring(), parent,
+ RefactoringSaveHelper.SAVE_NOTHING);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameDescriptor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameDescriptor.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameDescriptor.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,45 @@
+package org.jboss.tools.jsf.jsf2.refactoring.action.rename;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+
+
+@SuppressWarnings("restriction")
+public class CompositeAttributeRenameDescriptor implements IRenameDescriptor{
+
+ private String currentAttrName;
+ private RenameRefactoring refactoring;
+ private CompositeAttributeRenameProcessor processor;
+
+ public CompositeAttributeRenameDescriptor(IDOMAttr attr, IFile file, String URI) {
+ this.setCurrentAttrName(attr.getValue());
+ refactoring = new RenameRefactoring();
+ processor = new CompositeAttributeRenameProcessor(file.getProject());
+ processor.setCurrentAttrName(getCurrentName());
+ processor.setAttrToRename(attr);
+ processor.setBaseFile(file);
+ processor.setURI(URI);
+ }
+
+ public RenameUserInterfaceManager getInterfaceManager() {
+ return RenameUserInterfaceManager.getDefault();
+ }
+
+ public RenameRefactoring getRenameRefactoring() {
+ return refactoring;
+ }
+
+ public void setCurrentAttrName(String currentAttrName) {
+ this.currentAttrName = currentAttrName;
+ }
+
+ public String getCurrentName() {
+ return currentAttrName;
+ }
+
+ public RefactoringProcessor getRefactoringProcessor() {
+ return processor;
+ }
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameProcessor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameProcessor.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameProcessor.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,209 @@
+package org.jboss.tools.jsf.jsf2.refactoring.action.rename;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jdt.internal.corext.refactoring.changes.TextChangeCompatibility;
+import org.eclipse.jdt.internal.corext.refactoring.tagging.INameUpdating;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.GroupCategorySet;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
+import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
+import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
+import org.jboss.tools.jsf.jsf2.refactoring.core.StructuredChanges;
+import org.jboss.tools.jsf.jsf2.refactoring.core.StructuredTextFileChange;
+import org.jboss.tools.jsf.jsf2.util.JSF2ComponentUtil;
+import org.w3c.dom.Attr;
+import org.eclipse.ltk.core.refactoring.GroupCategory;
+import org.eclipse.text.edits.ReplaceEdit;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+
+@SuppressWarnings("restriction")
+public class CompositeAttributeRenameProcessor extends RenameProcessor
+ implements INameUpdating {
+
+ private static final Pattern PATTERN = Pattern.compile("[a-zA-Z_][a-zA-Z0-9_.]*+"); //$NON-NLS-1$
+ private static final GroupCategorySet CATEGORY_COMPOSITE_ATTR_RENAME = new GroupCategorySet(
+ new GroupCategory(
+ "org.jboss.tools.jsf.jsf2.refactoring.rename.composite.attr.type", "Rename composite attribute changes", "Changes to rename composite attribute")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ public static String IDENTIFIER = "org.jboss.tools.jsf.jsf2.refactor.compositeattrrenameprocessor"; //$NON-NLS-1$
+ private String newAttrName;
+ private String currentAttrName;
+ private IProject project;
+ private String URI;
+ private IFile baseFile;
+ private IDOMAttr attrToRename;
+
+ public void setCurrentAttrName(String currentAttrName) {
+ this.currentAttrName = currentAttrName;
+ }
+
+ public CompositeAttributeRenameProcessor(IProject project) {
+ this.setProject(project);
+ }
+
+ @Override
+ public RefactoringStatus checkFinalConditions(IProgressMonitor pm,
+ CheckConditionsContext context) throws CoreException,
+ OperationCanceledException {
+ return null;
+ }
+
+ @Override
+ public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
+ throws CoreException, OperationCanceledException {
+ return null;
+ }
+
+ @Override
+ public Change createChange(IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ StructuredChanges changes = new StructuredChanges(
+ "Composite attribute name changes"); //$NON-NLS-1$
+ StructuredTextFileChange baseFileChange = new StructuredTextFileChange(baseFile.getFullPath().toOSString(), baseFile);
+ ReplaceEdit edit = new ReplaceEdit(attrToRename.getValueRegionStartOffset()+1, attrToRename.getValue().length(), getNewElementName());
+ TextChangeCompatibility.addTextEdit(baseFileChange, "Rename composite attribute name", edit, CATEGORY_COMPOSITE_ATTR_RENAME); //$NON-NLS-1$
+ changes.add(baseFileChange);
+ Map<IFile, List<IDOMNode>> nodesMap = JSF2ComponentUtil
+ .findCompositeComponentsWithURI(getProject(), getURI());
+ Set<Entry<IFile, List<IDOMNode>>> entries = nodesMap.entrySet();
+ for (Entry<IFile, List<IDOMNode>> entry : entries) {
+ StructuredTextFileChange fileChange = createFileChange(entry
+ .getKey(), entry.getValue());
+ if (fileChange != null) {
+ changes.add(fileChange);
+ }
+ }
+ return changes;
+ }
+
+ private StructuredTextFileChange createFileChange(IFile file,
+ List<IDOMNode> nodeList) {
+ StructuredTextFileChange fileChange = null;
+ for (IDOMNode domNode : nodeList) {
+ if (domNode instanceof IDOMElement) {
+ IDOMElement element = (IDOMElement) domNode;
+ Attr attr = element.getAttributeNode(getCurrentElementName());
+ if (attr instanceof IDOMAttr) {
+ IDOMAttr domAttr = (IDOMAttr) attr;
+ if (fileChange == null) {
+ fileChange = new StructuredTextFileChange(file
+ .getFullPath().toOSString(), file);
+ }
+ ReplaceEdit edit = new ReplaceEdit(
+ domAttr.getStartOffset(), domAttr.getName()
+ .length(), getNewElementName());
+ TextChangeCompatibility
+ .addTextEdit(
+ fileChange,
+ "Rename Compoiste Attribute", edit, CATEGORY_COMPOSITE_ATTR_RENAME); //$NON-NLS-1$
+ }
+ }
+ }
+ return fileChange;
+ }
+
+ @Override
+ public Object[] getElements() {
+ return null;
+ }
+
+ @Override
+ public String getIdentifier() {
+ return IDENTIFIER;
+ }
+
+ @Override
+ public String getProcessorName() {
+ return "Rename Composite Attribute"; //$NON-NLS-1$
+ }
+
+ @Override
+ public boolean isApplicable() throws CoreException {
+ return true;
+ }
+
+ @Override
+ public RefactoringParticipant[] loadParticipants(RefactoringStatus status,
+ SharableParticipants sharedParticipants) throws CoreException {
+ return null;
+ }
+
+ public RefactoringStatus checkNewElementName(String newName)
+ throws CoreException {
+ RefactoringStatus status = null;
+ Matcher matcher = PATTERN.matcher(getNewElementName());
+ int includings = 0;
+ String matchString = null;
+ while (matcher.find()) {
+ includings++;
+ matchString = matcher.group();
+ }
+ if (includings != 1 || !matchString.equals(getNewElementName())) {
+ status = RefactoringStatus.createFatalErrorStatus("Attribute name is not valid"); //$NON-NLS-1$
+ }
+ return status;
+ }
+
+ public String getCurrentElementName() {
+ return currentAttrName;
+ }
+
+ public Object getNewElement() throws CoreException {
+ return null;
+ }
+
+ public String getNewElementName() {
+ return newAttrName;
+ }
+
+ public void setNewElementName(String newName) {
+ this.newAttrName = newName;
+ }
+
+ public void setProject(IProject project) {
+ this.project = project;
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public void setURI(String uRI) {
+ URI = uRI;
+ }
+
+ public String getURI() {
+ return URI;
+ }
+
+ public void setBaseFile(IFile baseFile) {
+ this.baseFile = baseFile;
+ }
+
+ public IFile getBaseFile() {
+ return baseFile;
+ }
+
+ public void setAttrToRename(IDOMAttr attrToRename) {
+ this.attrToRename = attrToRename;
+ }
+
+ public IDOMAttr getAttrToRename() {
+ return attrToRename;
+ }
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameRefactoringWizard.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameRefactoringWizard.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameRefactoringWizard.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,19 @@
+package org.jboss.tools.jsf.jsf2.refactoring.action.rename;
+
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.ltk.core.refactoring.Refactoring;
+
+@SuppressWarnings("restriction")
+public class CompositeAttributeRenameRefactoringWizard extends
+ org.eclipse.jdt.internal.ui.refactoring.reorg.RenameRefactoringWizard {
+
+ public CompositeAttributeRenameRefactoringWizard(Refactoring refactoring) {
+ super(refactoring,
+ "Rename Composite Attribute", //$NON-NLS-1$
+ "Enter New Name for Composite Attribute", //$NON-NLS-1$
+ JavaPluginImages.DESC_WIZBAN_REFACTOR,
+ IJavaHelpContextIds.RENAME_LOCAL_VARIABLE_WIZARD_PAGE);
+ }
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/IRenameDescriptor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/IRenameDescriptor.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/IRenameDescriptor.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,15 @@
+package org.jboss.tools.jsf.jsf2.refactoring.action.rename;
+
+import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
+
+public interface IRenameDescriptor {
+
+ RenameRefactoring getRenameRefactoring();
+
+ RenameUserInterfaceManager getInterfaceManager();
+
+ String getCurrentName();
+
+ RefactoringProcessor getRefactoringProcessor();
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameAction.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameAction.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameAction.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,79 @@
+package org.jboss.tools.jsf.jsf2.refactoring.action.rename;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.common.text.ext.IMultiPageEditor;
+import org.jboss.tools.jsf.jsf2.refactoring.RefactoringActionFactory;
+import org.jboss.tools.jsf.jsf2.refactoring.RefactoringActionManager;
+
+@SuppressWarnings("restriction")
+public class RenameAction extends AbstractHandler implements
+ IEditorActionDelegate {
+
+ private StructuredTextEditor textEditor;
+
+ private IRenameDescriptor descriptor;
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ return null;
+ }
+
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ }
+
+ @Override
+ public boolean isHandled() {
+ return descriptor != null;
+ }
+
+ public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+ if (targetEditor instanceof IMultiPageEditor) {
+ textEditor = ((IMultiPageEditor) targetEditor).getSourceEditor();
+ }
+ }
+
+ public void run(IAction action) {
+ if (textEditor == null) {
+ reportRefactoringInfo();
+ } else {
+ IEditorInput input = textEditor.getEditorInput();
+ if (!(input instanceof IFileEditorInput)) {
+ reportRefactoringInfo();
+ return;
+ }
+ if (((IFileEditorInput) textEditor.getEditorInput()).getFile()
+ .getProject() == null) {
+ reportRefactoringInfo();
+ return;
+ }
+ descriptor = RefactoringActionFactory
+ .createRenameDescriptor(textEditor);
+ RefactoringActionManager.getManager().renameWithAction(action,
+ descriptor);
+ }
+ descriptor = null;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ private void reportRefactoringInfo() {
+ MessageDialog.openInformation(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell(),
+ RefactoringMessages.RenameAction_rename,
+ "Refactoring is not available in the current place"); //$NON-NLS-1$
+ }
+
+}
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameRefactoring.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameRefactoring.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameRefactoring.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,8 @@
+package org.jboss.tools.jsf.jsf2.refactoring.action.rename;
+
+import org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring;
+
+@SuppressWarnings("deprecation")
+public class RenameRefactoring extends ProcessorBasedRefactoring{
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameUserInterfaceManager.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameUserInterfaceManager.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameUserInterfaceManager.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,18 @@
+package org.jboss.tools.jsf.jsf2.refactoring.action.rename;
+
+import org.eclipse.jdt.internal.ui.refactoring.UserInterfaceManager;
+
+@SuppressWarnings("restriction")
+public class RenameUserInterfaceManager extends UserInterfaceManager {
+
+ private static final RenameUserInterfaceManager fgInstance= new RenameUserInterfaceManager();
+
+ public static RenameUserInterfaceManager getDefault() {
+ return fgInstance;
+ }
+
+ private RenameUserInterfaceManager() {
+ put(CompositeAttributeRenameProcessor.class, RenameUserInterfaceStarter.class, CompositeAttributeRenameRefactoringWizard.class);
+ }
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameUserInterfaceStarter.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameUserInterfaceStarter.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/RenameUserInterfaceStarter.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,8 @@
+package org.jboss.tools.jsf.jsf2.refactoring.action.rename;
+
+import org.eclipse.jdt.internal.ui.refactoring.UserInterfaceStarter;
+
+@SuppressWarnings("restriction")
+public class RenameUserInterfaceStarter extends UserInterfaceStarter {
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/StructuredChanges.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/StructuredChanges.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/StructuredChanges.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,16 @@
+package org.jboss.tools.jsf.jsf2.refactoring.core;
+
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+
+public class StructuredChanges extends CompositeChange {
+
+ public StructuredChanges(String name, Change[] children) {
+ super(name, children);
+ }
+
+ public StructuredChanges(String name){
+ super(name);
+ }
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/StructuredTextFileChange.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/StructuredTextFileChange.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/core/StructuredTextFileChange.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,43 @@
+package org.jboss.tools.jsf.jsf2.refactoring.core;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.common.text.ext.IMultiPageEditor;
+
+public class StructuredTextFileChange extends TextFileChange{
+
+ public StructuredTextFileChange(String name, IFile file) {
+ super(name, file);
+ }
+
+
+ @Override
+ protected void releaseDocument(final IDocument document, IProgressMonitor pm)
+ throws CoreException {
+ super.releaseDocument(document, pm);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ IEditorPart[] editors = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getDirtyEditors();
+ for (IEditorPart editorPart : editors) {
+ if (editorPart instanceof IMultiPageEditor) {
+ StructuredTextEditor editor = ((IMultiPageEditor) editorPart).getSourceEditor();
+ IDocument editorDocument = editor.getTextViewer().getDocument();
+ if (document == editorDocument) {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveEditor(editorPart, false);
+ return;
+ }
+ }
+ }
+ }
+
+ });
+ }
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/view/StructuredChangesPreviewViewer.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/view/StructuredChangesPreviewViewer.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/view/StructuredChangesPreviewViewer.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -0,0 +1,8 @@
+package org.jboss.tools.jsf.jsf2.refactoring.view;
+
+import org.eclipse.ltk.internal.ui.refactoring.TextEditChangePreviewViewer;
+
+@SuppressWarnings("restriction")
+public class StructuredChangesPreviewViewer extends TextEditChangePreviewViewer {
+
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ComponentUtil.java 2010-06-03 12:20:23 UTC (rev 22509)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ComponentUtil.java 2010-06-03 12:21:57 UTC (rev 22510)
@@ -13,12 +13,22 @@
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.jboss.tools.jsf.jsf2.model.JSF2ComponentModelManager;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -126,4 +136,53 @@
return false;
}
+ public static Map<IFile, List<IDOMNode>> findCompositeComponentsWithURI(
+ IResource resource, String URI) throws CoreException {
+ Map<IFile, List<IDOMNode>> nodeMap = new HashMap<IFile, List<IDOMNode>>();
+ findCompositeComponentsWithURI(resource, nodeMap, URI);
+ return nodeMap;
+ }
+
+ private static void findCompositeComponentsWithURI(IResource resource,
+ Map<IFile, List<IDOMNode>> nodeMap, String URI)
+ throws CoreException {
+ if (resource instanceof IFile) {
+ IFile file = (IFile) resource;
+ IDOMDocument document = JSF2ComponentModelManager
+ .getReadableDOMDocument(file);
+ Map<String, List<Element>> map = findCompositeComponents(document);
+ Set<Entry<String, List<Element>>> entries = map.entrySet();
+ List<IDOMNode> nodes = new ArrayList<IDOMNode>();
+ for (Iterator<Entry<String, List<Element>>> iterator = entries
+ .iterator(); iterator.hasNext();) {
+ Entry<String, List<Element>> entry = (Entry<String, List<Element>>) iterator
+ .next();
+ if (URI.equals(entry.getKey())) {
+ for (Element element : entry.getValue()) {
+ if (element instanceof IDOMNode) {
+ nodes.add((IDOMNode) element);
+ }
+ }
+ }
+ }
+ if (!nodes.isEmpty()) {
+ nodeMap.put(file, nodes);
+ }
+ } else if (resource instanceof IProject) {
+ IResource[] children = ((IProject) resource).members();
+ if (children != null) {
+ for (int i = 0; i < children.length; i++) {
+ findCompositeComponentsWithURI(children[i], nodeMap, URI);
+ }
+ }
+ } else if (resource instanceof IFolder) {
+ IResource[] children = ((IFolder) resource).members();
+ if (children != null) {
+ for (int i = 0; i < children.length; i++) {
+ findCompositeComponentsWithURI(children[i], nodeMap, URI);
+ }
+ }
+ }
+ }
+
}
15 years, 4 months
JBoss Tools SVN: r22509 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-06-03 08:20:23 -0400 (Thu, 03 Jun 2010)
New Revision: 22509
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
Log:
https://jira.jboss.org/browse/JBIDE-6142 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java 2010-06-03 10:56:31 UTC (rev 22508)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java 2010-06-03 12:20:23 UTC (rev 22509)
@@ -22,17 +22,13 @@
package org.hibernate.eclipse.console.wizards;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
import java.util.Properties;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.IWizardPage;
@@ -92,7 +88,7 @@
* Adding the page to the wizard.
*/
public void addPages() {
- cPage = new ExtendedWizardNewFileCreationPage( "Ccfgxml", (IStructuredSelection) selection ) {
+ cPage = new ExtendedWizardNewFileCreationPage( "Ccfgxml", (IStructuredSelection) selection ) { //$NON-NLS-1$
protected InputStream getInitialContents() {
final Properties props = new Properties();
putIfNotNull(props, Environment.SESSION_FACTORY_NAME, connectionInfoPage.getSessionFactoryName() );
@@ -105,10 +101,11 @@
putIfNotNull(props, Environment.DEFAULT_SCHEMA, connectionInfoPage.getDefaultSchema() );
return openContentStream(props);
}
- }; //$NON-NLS-1$
+ };
cPage.setTitle( HibernateConsoleMessages.NewConfigurationWizard_create_hibernate_cfg_file );
cPage.setDescription( HibernateConsoleMessages.NewConfigurationWizard_create_new_hibernate_cfg_xml );
cPage.setFileName("hibernate.cfg.xml"); //$NON-NLS-1$
+ cPage.setFileExtension("cfg.xml"); //$NON-NLS-1$
addPage( cPage );
15 years, 4 months
JBoss Tools SVN: r22508 - workspace.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-06-03 06:56:31 -0400 (Thu, 03 Jun 2010)
New Revision: 22508
Added:
workspace/smooks-dmb/
Log:
ModelBuilder Branch
Copied: workspace/smooks-dmb (from rev 22507, trunk)
15 years, 4 months
JBoss Tools SVN: r22507 - branches/3.2.helios/common/plugins.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-03 00:52:41 -0400 (Thu, 03 Jun 2010)
New Revision: 22507
Modified:
branches/3.2.helios/common/plugins/pom.xml
Log:
copy org.jboss.tools.common.model.ui.capabilities from trunk to branch
Modified: branches/3.2.helios/common/plugins/pom.xml
===================================================================
--- branches/3.2.helios/common/plugins/pom.xml 2010-06-03 04:52:06 UTC (rev 22506)
+++ branches/3.2.helios/common/plugins/pom.xml 2010-06-03 04:52:41 UTC (rev 22507)
@@ -19,6 +19,7 @@
<module>org.jboss.tools.common.meta.ui</module>
<module>org.jboss.tools.common.model</module>
<module>org.jboss.tools.common.model.ui</module>
+ <module>org.jboss.tools.common.model.ui.capabilities</module>
<module>org.jboss.tools.common.projecttemplates</module>
<module>org.jboss.tools.common.resref.core</module>
<module>org.jboss.tools.common.resref.ui</module>
15 years, 4 months
JBoss Tools SVN: r22506 - in branches/3.2.helios/common/plugins: org.jboss.tools.common.model.ui.capabilities and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-03 00:52:06 -0400 (Thu, 03 Jun 2010)
New Revision: 22506
Added:
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.classpath
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.project
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.settings/
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.settings/org.eclipse.jdt.core.prefs
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/MANIFEST.MF
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/about.html
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/plugin.properties
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/plugin.xml
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/pom.xml
branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/src/
Log:
copy org.jboss.tools.common.model.ui.capabilities from trunk to branch
Property changes on: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities
___________________________________________________________________
Name: svn:ignore
+ target
buildlog.latest.txt
bin
build
*.class
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.classpath
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.classpath (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.classpath 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.project
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.project (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.project 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.common.model.ui.capabilities</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/.settings/org.eclipse.jdt.core.prefs 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,8 @@
+#Wed Jun 02 10:26:06 PDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/MANIFEST.MF
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/MANIFEST.MF (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/MANIFEST.MF 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.jboss.tools.common.model.ui.capabilities;singleton:=true
+Bundle-Version: 3.1.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="3.5.2"
+Bundle-Vendor: %providerName
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/about.html
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/about.html (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/about.html 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/plugin.properties
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/plugin.properties (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/plugin.properties 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,6 @@
+providerName=JBoss by Red Hat
+pluginName=JBoss Tools Experimental JSF/Struts Project Templates Development
+
+CategoryName_experimental=JBoss Tools Experimental configuration
+CategoryDescription_experimental=It allows create Custom Capabilities, Library sets and Project templates for JSF/Struts projects
+ActivityName_templates=JSF/Struts Project Templates Development
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/plugin.xml
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/plugin.xml (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/plugin.xml 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.activities">
+ <category
+ description="%CategoryDescription_experimental"
+ id="org.jboss.tools.common.model.ui.experimental"
+ name="%CategoryName_experimental">
+ </category>
+ <categoryActivityBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ categoryId="org.jboss.tools.common.model.ui.experimental">
+ </categoryActivityBinding>
+ <activity
+ id="org.jboss.tools.common.model.ui.templates"
+ name="%ActivityName_templates">
+ </activity>
+ <activityPatternBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ pattern="org\.jboss\.tools\.common\.model\.ui/.*templates">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ pattern="org\.jboss\.tools\.jsf\.ui/.*jsfimplementations">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ pattern="org\.jboss\.tools\.jsf\.ui/.*capabilities">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ pattern="ExadelTemplatesPropertiesPage">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ pattern="org\.jboss\.tools\.struts\.ui/.*environments">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ pattern="org\.jboss\.tools\.jst\.web\.ui/.*libsets">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ pattern="org\.jboss\.tools\.common\.model\.ui/ExadelTemplatesPropertiesPage">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.jboss.tools.common.model.ui.templates"
+ pattern="org\.jboss\.tools\.jst\.web\.ui/.*SaveProjectAsTemplateActionDelegate">
+ </activityPatternBinding>
+ </extension>
+</plugin>
Added: branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/pom.xml
===================================================================
--- branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/pom.xml (rev 0)
+++ branches/3.2.helios/common/plugins/org.jboss.tools.common.model.ui.capabilities/pom.xml 2010-06-03 04:52:06 UTC (rev 22506)
@@ -0,0 +1,14 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.common.model.ui.capabilities</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
15 years, 4 months
JBoss Tools SVN: r22505 - trunk/common.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-03 00:28:16 -0400 (Thu, 03 Jun 2010)
New Revision: 22505
Modified:
trunk/common/pom.xml
Log:
reorder pom.xml
Modified: trunk/common/pom.xml
===================================================================
--- trunk/common/pom.xml 2010-06-03 03:39:30 UTC (rev 22504)
+++ trunk/common/pom.xml 2010-06-03 04:28:16 UTC (rev 22505)
@@ -12,8 +12,8 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
+ <module>plugins</module>
<module>features</module>
- <module>plugins</module>
<module>tests</module>
<module>site</module>
</modules>
15 years, 4 months
JBoss Tools SVN: r22504 - branches/3.2.helios.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-02 23:39:30 -0400 (Wed, 02 Jun 2010)
New Revision: 22504
Modified:
branches/3.2.helios/parent-pom.xml
Log:
add galileo deps to parent-pom.xml because some plugins still depend on those reqs
Modified: branches/3.2.helios/parent-pom.xml
===================================================================
--- branches/3.2.helios/parent-pom.xml 2010-06-03 03:39:07 UTC (rev 22503)
+++ branches/3.2.helios/parent-pom.xml 2010-06-03 03:39:30 UTC (rev 22504)
@@ -234,7 +234,65 @@
<enabled>true</enabled>
</releases>
</repository>
+
<repository>
+ <id>galileo</id>
+ <url>http://download.eclipse.org/releases/galileo/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>eclipse35</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt25r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.5</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>swtbot-galileo</id>
+ <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <url>http://download.eclipse.org/webtools/updates/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
<id>m2eclipse</id>
<url>http://m2eclipse.sonatype.org/sites/m2e/</url>
<layout>p2</layout>
15 years, 4 months
JBoss Tools SVN: r22503 - trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-02 23:39:07 -0400 (Wed, 02 Jun 2010)
New Revision: 22503
Modified:
trunk/parent-pom.xml
Log:
add galileo deps to parent-pom.xml because some plugins still depend on those reqs
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-06-03 03:26:30 UTC (rev 22502)
+++ trunk/parent-pom.xml 2010-06-03 03:39:07 UTC (rev 22503)
@@ -168,8 +168,8 @@
<repositories>
<repository>
- <id>galileo</id>
- <url>http://download.eclipse.org/releases/galileo/</url>
+ <id>helios</id>
+ <url>http://download.eclipse.org/releases/helios/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -179,8 +179,8 @@
</releases>
</repository>
<repository>
- <id>eclipse35</id>
- <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
+ <id>webtools32</id>
+ <url>http://download.eclipse.org/webtools/repository/helios</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -190,8 +190,8 @@
</releases>
</repository>
<repository>
- <id>birt25r</id>
- <url>http://download.eclipse.org/birt/update-site/2.5</url>
+ <id>eclipse36</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.6/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -201,9 +201,8 @@
</releases>
</repository>
<repository>
- <id>swtbot-galileo</id>
- <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
- </url>
+ <id>birt26r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.6/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -213,8 +212,8 @@
</releases>
</repository>
<repository>
- <id>webtools</id>
- <url>http://download.eclipse.org/webtools/updates/</url>
+ <id>birt26i</id>
+ <url>http://download.eclipse.org/birt/update-site/2.6-interim/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -223,11 +222,10 @@
<enabled>true</enabled>
</releases>
</repository>
-
- <!--
<repository>
- <id>helios</id>
- <url>http://download.eclipse.org/releases/helios/</url>
+ <id>swtbot-helios</id>
+ <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/
+ </url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -236,9 +234,10 @@
<enabled>true</enabled>
</releases>
</repository>
+
<repository>
- <id>webtools32</id>
- <url>http://download.eclipse.org/webtools/repository/helios</url>
+ <id>galileo</id>
+ <url>http://download.eclipse.org/releases/galileo/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -248,8 +247,8 @@
</releases>
</repository>
<repository>
- <id>eclipse36</id>
- <url>http://download.eclipse.org/eclipse/updates/3.6/</url>
+ <id>eclipse35</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -259,8 +258,8 @@
</releases>
</repository>
<repository>
- <id>birt26r</id>
- <url>http://download.eclipse.org/birt/update-site/2.6/</url>
+ <id>birt25r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.5</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -270,8 +269,9 @@
</releases>
</repository>
<repository>
- <id>birt26i</id>
- <url>http://download.eclipse.org/birt/update-site/2.6-interim/</url>
+ <id>swtbot-galileo</id>
+ <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
+ </url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -281,9 +281,8 @@
</releases>
</repository>
<repository>
- <id>swtbot-helios</id>
- <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/
- </url>
+ <id>webtools</id>
+ <url>http://download.eclipse.org/webtools/updates/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -292,7 +291,7 @@
<enabled>true</enabled>
</releases>
</repository>
- -->
+
<repository>
<id>m2eclipse</id>
<url>http://m2eclipse.sonatype.org/sites/m2e/</url>
15 years, 4 months
JBoss Tools SVN: r22502 - trunk/jsf/tests/org.jboss.tools.jsf.test.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-02 23:26:30 -0400 (Wed, 02 Jun 2010)
New Revision: 22502
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/pom.xml
Log:
fix version to match manifest
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/pom.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/pom.xml 2010-06-03 00:33:13 UTC (rev 22501)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/pom.xml 2010-06-03 03:26:30 UTC (rev 22502)
@@ -9,7 +9,7 @@
</parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.jsf.test</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
15 years, 4 months