JBoss Tools SVN: r37752 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-10 20:50:47 -0500 (Tue, 10 Jan 2012)
New Revision: 37752
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
Log:
JBIDE-10601
https://issues.joss.org/browse/JBIDE-10601
When copying context, we should check if definition exists. Alternatively, we would have to do clean build.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2012-01-11 01:37:14 UTC (rev 37751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2012-01-11 01:50:47 UTC (rev 37752)
@@ -81,12 +81,31 @@
}
if(!clean) {
copy.types.addAll(types);
- copy.typeDefinitions.putAll(typeDefinitions);
- copy.annotations.putAll(annotations);
+ for (String qn: typeDefinitions.keySet()) {
+ TypeDefinition d = typeDefinitions.get(qn);
+ if(d.exists()) {
+ copy.typeDefinitions.put(qn, d);
+ } else {
+ copy.types.remove(qn);
+ }
+ }
+ for (String qn: annotations.keySet()) {
+ AnnotationDefinition d = annotations.get(qn);
+ if(d.exists()) {
+ copy.annotations.put(qn, d);
+ }
+ }
copy.vetoedTypes.addAll(vetoedTypes);
copy.packages.addAll(packages);
- copy.packageDefinitions.putAll(packageDefinitions);
+ for (String qn: packageDefinitions.keySet()) {
+ PackageDefinition d = packageDefinitions.get(qn);
+ if(d.exists()) {
+ copy.packageDefinitions.put(qn, d);
+ } else {
+ packages.remove(qn);
+ }
+ }
for (IPath p: resources.keySet()) {
Set<String> set = resources.get(p);
12 years, 11 months
JBoss Tools SVN: r37751 - in trunk/seam: plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-10 20:37:14 -0500 (Tue, 10 Jan 2012)
New Revision: 37751
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamNewWizardTest.java
Removed:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/ISeamUiConstants.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-10606 Seam Generate Entities wizard problem
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/ISeamUiConstants.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/ISeamUiConstants.java 2012-01-10 22:20:21 UTC (rev 37750)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/ISeamUiConstants.java 2012-01-11 01:37:14 UTC (rev 37751)
@@ -20,7 +20,8 @@
NEW_SEAM_PROJECT_WIZARD_ID = "org.jboss.tools.seam.ui.wizards.SeamProjectWizard", //$NON-NLS-1$
NEW_SEAM_FORM_WIZARD_ID = "org.jboss.tools.seam.ui.wizard.SeamFormWizard", //$NON-NLS-1$
NEW_SEAM_ACTION_WIZARD_ID = "org.jboss.tools.seam.ui.wizard.SeamActionWizard", //$NON-NLS-1$
- NEW_SEAM_CONVERSATION_WIZARD_ID = "org.jboss.tools.seam.ui.wizard.SeamConversationWizard",
- NEW_SEAM_ENTITY_WIZARD_ID = "org.jboss.tools.seam.ui.wizard.SeamEntityWizard",
+ NEW_SEAM_CONVERSATION_WIZARD_ID = "org.jboss.tools.seam.ui.wizard.SeamConversationWizard", //$NON-NLS-1$
+ NEW_SEAM_ENTITY_WIZARD_ID = "org.jboss.tools.seam.ui.wizard.SeamEntityWizard", //$NON-NLS-1$
+ NEW_GENERATE_SEAM_ENTITY_WIZARD_ID ="org.jboss.tools.seam.ui.wizard.SeamGenerateEnitiesWizard", //$NON-NLS-1$
SEAM_COMPONENTS_VIEW_ID = "org.jboss.tools.seam.ui.views.SeamComponentsNavigator"; //$NON-NLS-1$
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java 2012-01-10 22:20:21 UTC (rev 37750)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java 2012-01-11 01:37:14 UTC (rev 37751)
@@ -18,7 +18,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
@@ -172,6 +171,20 @@
return PathHelper.pathOrNull(reverseEngineeringSettings.getText() );
}
+ /**
+ * @return the projectEditor
+ */
+ public IFieldEditor getProjectEditor() {
+ return projectEditor;
+ }
+
+ /**
+ * @return the rootSeamProject
+ */
+ public IProject getRootSeamProject() {
+ return rootSeamProject;
+ }
+
private static String getConsoleConfigurationName(String seamWebProjectName) {
if(seamWebProjectName==null || seamWebProjectName.trim().length()==0) {
return null;
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2012-01-10 22:20:21 UTC (rev 37750)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2012-01-11 01:37:14 UTC (rev 37751)
@@ -38,9 +38,9 @@
import org.jboss.tools.seam.ui.test.wizard.PackageNamesTest;
import org.jboss.tools.seam.ui.test.wizard.Seam20XCreateTestProjectTest;
import org.jboss.tools.seam.ui.test.wizard.Seam20XProjectNamesTest;
-import org.jboss.tools.seam.ui.test.wizard.SeamActionNewWizardTest;
import org.jboss.tools.seam.ui.test.wizard.SeamCreateTestProjectTest;
import org.jboss.tools.seam.ui.test.wizard.SeamFormNewWizardTest;
+import org.jboss.tools.seam.ui.test.wizard.SeamNewWizardTest;
import org.jboss.tools.seam.ui.test.wizard.SeamProjectNamesTest;
import org.jboss.tools.seam.ui.test.wizard.SeamProjectNewWizardTest;
import org.jboss.tools.test.util.JobUtils;
@@ -64,7 +64,9 @@
suite.addTest(SeamComponentsViewAllTests.suite());
suite.addTest(SeamProjectNewWizardTest.suite());
- suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamActionNewWizardTest.class), "org.jboss.tools.seam.base.test", new String[]{"projects/Test1-ear", "projects/Test1-ejb", "projects/Test1"}, new String[]{"Test1-ear", "Test1-ejb", "Test1"}));
+ TestSuite wizards = new TestSuite("Seam Wizards tests");
+ wizards.addTestSuite(SeamNewWizardTest.class);
+ suite.addTest(new ProjectImportTestSetup(wizards, "org.jboss.tools.seam.base.test", new String[]{"projects/Test1-ear", "projects/Test1-ejb", "projects/Test1"}, new String[]{"Test1-ear", "Test1-ejb", "Test1"}));
suite.addTestSuite(SeamFormNewWizardTest.class);
suite.addTestSuite(SeamPreferencesPageTest.class);
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java 2012-01-10 22:20:21 UTC (rev 37750)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java 2012-01-11 01:37:14 UTC (rev 37751)
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.test.wizard;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.seam.ui.ISeamUiConstants;
-import org.jboss.tools.seam.ui.wizard.ISeamParameter;
-import org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage;
-import org.jboss.tools.test.util.WorkbenchUtils;
-
-/**
- * @author eskimo
- *
- */
-public class SeamActionNewWizardTest extends TestCase {
-
- /**
- * https://jira.jboss.org/jira/browse/JBIDE-3752
- */
- public void testSeamActionNewWizardInstanceIsInitialized() {
- IWizard
- aWizard = WorkbenchUtils.findWizardByDefId(
- ISeamUiConstants.NEW_SEAM_ACTION_WIZARD_ID);
-
- WizardDialog dialog = new WizardDialog(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- aWizard);
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- SeamBaseWizardPage page = (SeamBaseWizardPage)dialog.getSelectedPage();
-
- page.getEditor(ISeamParameter.SEAM_PROJECT_NAME).setValue("Test1-ear");
- assertEquals("Seam web parent project was not initialized for Seam EAR project.", "Test1", page.getRootSeamProject());
- } finally {
- dialog.close();
- }
- }
-}
\ No newline at end of file
Copied: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamNewWizardTest.java (from rev 37745, trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java)
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamNewWizardTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamNewWizardTest.java 2012-01-11 01:37:14 UTC (rev 37751)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.test.wizard;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.seam.ui.ISeamUiConstants;
+import org.jboss.tools.seam.ui.wizard.ISeamParameter;
+import org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage;
+import org.jboss.tools.seam.ui.wizard.SeamGenerateEntitiesWizardPage;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+/**
+ * @author eskimo
+ */
+public class SeamNewWizardTest extends TestCase {
+
+ /**
+ * https://jira.jboss.org/jira/browse/JBIDE-3752
+ */
+ public void testSeamActionNewWizardInstanceIsInitialized() {
+ testSeamBaseNewWizardInstanceIsInitialized(ISeamUiConstants.NEW_SEAM_ACTION_WIZARD_ID);
+ }
+
+ public void testSeamConversationNewWizardInstanceIsInitialized() {
+ testSeamBaseNewWizardInstanceIsInitialized(ISeamUiConstants.NEW_SEAM_CONVERSATION_WIZARD_ID);
+ }
+
+ public void testSeamFormNewWizardInstanceIsInitialized() {
+ testSeamBaseNewWizardInstanceIsInitialized(ISeamUiConstants.NEW_SEAM_FORM_WIZARD_ID);
+ }
+
+ public void testSeamEntityNewWizardInstanceIsInitialized() {
+ testSeamBaseNewWizardInstanceIsInitialized(ISeamUiConstants.NEW_SEAM_ENTITY_WIZARD_ID);
+ }
+
+ public void testSeamBaseNewWizardInstanceIsInitialized(String wizardId) {
+ IWizard
+ aWizard = WorkbenchUtils.findWizardByDefId(wizardId);
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ SeamBaseWizardPage page = (SeamBaseWizardPage)dialog.getSelectedPage();
+
+ page.getEditor(ISeamParameter.SEAM_PROJECT_NAME).setValue("Test1-ear");
+ assertEquals("Seam web parent project was not initialized for Seam EAR project.", "Test1", page.getRootSeamProject());
+ } finally {
+ dialog.close();
+ }
+ }
+
+ /**
+ * https://jira.jboss.org/jira/browse/JBIDE-10606
+ */
+ public void testSeamGenerateEntitiesNewWizardInstanceIsInitialized() {
+ IWizard
+ aWizard = WorkbenchUtils.findWizardByDefId(ISeamUiConstants.NEW_GENERATE_SEAM_ENTITY_WIZARD_ID);
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ SeamGenerateEntitiesWizardPage page = (SeamGenerateEntitiesWizardPage)dialog.getSelectedPage();
+
+ page.getProjectEditor().setValue("Test1-ear");
+ assertEquals("Seam web parent project was not initialized for Seam EAR project.", "Test1", page.getRootSeamProject());
+ } finally {
+ dialog.close();
+ }
+ }
+}
\ No newline at end of file
12 years, 11 months
JBoss Tools SVN: r37750 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common: model/ui/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-10 17:20:21 -0500 (Tue, 10 Jan 2012)
New Revision: 37750
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/XModelObjectEditorInput.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/ModelObjectJarEntryEditorInput.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/ModelObjectStorageEditorInput.java
Log:
JBIDE-9420
https://issues.joss.org/browse/JBIDE-9420
In storage editor inputs, handle not only jar entries, but also files from external class folders.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/XModelObjectEditorInput.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/XModelObjectEditorInput.java 2012-01-10 22:12:02 UTC (rev 37749)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/XModelObjectEditorInput.java 2012-01-10 22:20:21 UTC (rev 37750)
@@ -30,6 +30,7 @@
import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.XModelObjectConstants;
import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.filesystems.impl.*;
import org.jboss.tools.common.model.project.IModelNature;
@@ -297,21 +298,18 @@
if(model == null) return null;
XModelObject[] fs = FileSystemsHelper.getFileSystems(model).getChildren();
for (XModelObject s: fs) {
- if(s instanceof JarSystemImpl) {
- JarSystemImpl j = (JarSystemImpl)s;
- String loc = j.getLocation();
- if(new File(loc).equals(new File(jarFile))) {
- XModelObject result = s.getChildByPath(entry);
- if(result == null && entry != null) {
- int q = entry.indexOf('/');
- int d = entry.indexOf('.');
- if(q > d && d >= 0) {
- String entry1 = entry.substring(0, q).replace('.', '/') + entry.substring(q);
- result = s.getChildByPath(entry1);
- }
+ String loc = Paths.expand(s.get(XModelObjectConstants.ATTR_NAME_LOCATION), model.getProperties());
+ if(new File(loc).equals(new File(jarFile))) {
+ XModelObject result = s.getChildByPath(entry);
+ if(result == null && entry != null) {
+ int q = entry.indexOf('/');
+ int d = entry.indexOf('.');
+ if(q > d && d >= 0) {
+ String entry1 = entry.substring(0, q).replace('.', '/') + entry.substring(q);
+ result = s.getChildByPath(entry1);
}
- if(result != null) return result;
}
+ if(result != null) return result;
}
}
return (n == null) ? null : n.getModel().getByPath("/" + entry); //$NON-NLS-1$
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/ModelObjectJarEntryEditorInput.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/ModelObjectJarEntryEditorInput.java 2012-01-10 22:12:02 UTC (rev 37749)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/ModelObjectJarEntryEditorInput.java 2012-01-10 22:20:21 UTC (rev 37750)
@@ -35,6 +35,9 @@
}
public boolean equals(Object o) {
+ if(o == this) {
+ return true;
+ }
if(o instanceof IStorageEditorInput) {
IStorageEditorInput input = (IStorageEditorInput)o;
IStorage storage = null;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/ModelObjectStorageEditorInput.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/ModelObjectStorageEditorInput.java 2012-01-10 22:12:02 UTC (rev 37749)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/ModelObjectStorageEditorInput.java 2012-01-10 22:20:21 UTC (rev 37750)
@@ -11,16 +11,19 @@
package org.jboss.tools.common.model.ui.editor;
import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
+import org.eclipse.jdt.core.IJarEntryResource;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.internal.core.JarEntryDirectory;
import org.eclipse.jdt.internal.core.JarEntryFile;
import org.eclipse.jdt.internal.core.JarEntryResource;
-import org.eclipse.jdt.internal.core.PackageFragment;
+import org.eclipse.jdt.internal.core.NonJavaResource;
import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
import org.jboss.tools.common.core.resources.XModelObjectEditorInputFactory;
import org.eclipse.ui.*;
@@ -30,10 +33,11 @@
import org.jboss.tools.common.model.filesystems.impl.*;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.model.util.Paths;
import org.jboss.tools.common.util.FileUtil;
public class ModelObjectStorageEditorInput extends ModelObjectEditorInput implements IStorageEditorInput {
- JarEntryFile jarEntryFile = null;
+ IJarEntryResource jarEntryFile = null;
public ModelObjectStorageEditorInput(XModelObject object) {
super(object);
@@ -44,15 +48,25 @@
return jarEntryFile != null ? jarEntryFile : storage;
}
- JarEntryFile findJarEntryFile() {
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Class adapter) {
+ if(adapter == IFile.class) return null;
+ return super.getAdapter(adapter);
+ }
+
+ IJarEntryResource findJarEntryFile() {
XModelObject o = object;
JarEntryFile f = null;
JarEntryResource current = null;
String packageName = "";
+ List<String> parts = new ArrayList<String>();
+ List<XModelObject> os = new ArrayList<XModelObject>();
while(o != null && o.getFileType() != XModelObject.SYSTEM) {
String part = o.getFileType() == XModelObject.FILE ? FileAnyImpl.toFileName(o) :
o.getFileType() == XModelObject.FOLDER ? o.getAttributeValue(XModelObjectConstants.ATTR_NAME) : null;
if(part != null) {
+ parts.add(0, part);
+ os.add(0, o);
if(f == null) {
f = new JarEntryFile(part) {
public InputStream getContents() throws CoreException {
@@ -61,7 +75,6 @@
};
current = f;
} else {
- if(f == null) return null;
if(packageName.length() > 0) {
packageName = part + "." + packageName;
} else {
@@ -75,8 +88,8 @@
}
o = o.getParent();
}
- if(!(o instanceof JarSystemImpl)) return null;
- String file = ((JarSystemImpl)o).getLocation();
+// if(!(o instanceof JarSystemImpl)) return null;
+ String file = Paths.expand(o.get(XModelObjectConstants.ATTR_NAME_LOCATION), o.getModel().getProperties());
IProject p = EclipseResourceUtil.getProject(o);
IJavaProject jp = EclipseResourceUtil.getJavaProject(p);
@@ -111,6 +124,21 @@
f.setParent(pf);
} else {
current.setParent(root);
+ if(!(o instanceof JarSystemImpl)) {
+ Object q = root;
+ NonJavaResource nj = null;
+ for (int i = 0; i < parts.size(); i++) {
+ IResource ri = (IResource)os.get(i).getAdapter(IResource.class);
+ if(ri == null) {
+ return f;
+ }
+ nj = new NonJavaResource(q, ri);
+ q = nj;
+ }
+ if(nj != null) {
+ return nj;
+ }
+ }
}
return f;
12 years, 11 months
JBoss Tools SVN: r37749 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-10 17:12:02 -0500 (Tue, 10 Jan 2012)
New Revision: 37749
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java
Log:
JBIDE-9420
https://issues.joss.org/browse/JBIDE-9420
For external class folders, take resource from ExternalPackageFragmentRoot object.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java 2012-01-10 22:08:44 UTC (rev 37748)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java 2012-01-10 22:12:02 UTC (rev 37749)
@@ -17,6 +17,10 @@
import org.eclipse.core.resources.*;
import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.core.runtime.*;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.internal.core.ExternalPackageFragmentRoot;
+import org.eclipse.jdt.internal.core.PackageFragmentRoot;
import org.jboss.tools.common.model.XModelObjectConstants;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.*;
@@ -105,6 +109,20 @@
ModelPlugin.getPluginLog().logError(e);
}
}
+
+ if(f == null) {
+ IJavaProject jp = EclipseResourceUtil.getJavaProject(getProject());
+ if(jp != null) {
+ IPackageFragmentRoot p = jp.getPackageFragmentRoot(thloc);
+ if(p instanceof ExternalPackageFragmentRoot && p.exists()) {
+ IResource r = ((PackageFragmentRoot)p).resource();
+ if(r instanceof IContainer) {
+ f = (IContainer)r;
+ }
+ }
+ }
+ }
+
resource = f;
if(resource == null) {
12 years, 11 months
JBoss Tools SVN: r37748 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-10 17:08:44 -0500 (Tue, 10 Jan 2012)
New Revision: 37748
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java
Log:
JBIDE-9420
https://issues.joss.org/browse/JBIDE-9420
Load taglibs from external class folders.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java 2012-01-10 18:59:00 UTC (rev 37747)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java 2012-01-10 22:08:44 UTC (rev 37748)
@@ -16,7 +16,6 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.filesystems.impl.Libs;
-import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
import org.jboss.tools.jst.web.tld.model.TLDUtil;
@@ -25,11 +24,11 @@
protected Iterator<XModelObject> getRoots() {
List<XModelObject> list = new ArrayList<XModelObject>();
- XModelObject r = getModel().getByPath("FileSystems/WEB-INF");
+ XModelObject r = FileSystemsHelper.getWebInf(getModel());
if(r != null) list.add(r);
- XModelObject fss = getModel().getByPath("FileSystems");
+ XModelObject fss = FileSystemsHelper.getFileSystems(getModel());
if(fss == null) return list.iterator();
- XModelObject[] fs = fss.getChildren("FileSystemJar");
+ XModelObject[] fs = fss.getChildren();
for (int i = 0; i < fs.length; i++) {
if(!fs[i].getAttributeValue("name").startsWith(Libs.LIB_PREFIX)) continue;
r = fs[i].getChildByPath("META-INF");
@@ -107,7 +106,7 @@
public Object getAdapter(Class adapter) {
if(adapter == IResource.class) {
- XModelObject o = getModel().getByPath("FileSystems/WEB-INF");
+ XModelObject o = FileSystemsHelper.getWebInf(getModel());
return (o != null) ? o.getAdapter(adapter) : null;
}
return super.getAdapter(adapter);
12 years, 11 months
JBoss Tools SVN: r37747 - in trunk: jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-10 13:59:00 -0500 (Tue, 10 Jan 2012)
New Revision: 37747
Added:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/BaseQuickAssistProcessor.java
Removed:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/JBDSQuickAssistProcessor.java
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/HTMLTextViewerConfiguration.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JSPTextViewerConfiguration.java
Log:
Renamed JBDSQuickAssistProcessor -> BaseQuickAssistProcessor
Copied: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/BaseQuickAssistProcessor.java (from rev 37745, trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/JBDSQuickAssistProcessor.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/BaseQuickAssistProcessor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/BaseQuickAssistProcessor.java 2012-01-10 18:59:00 UTC (rev 37747)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.common.text.xml;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
+import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+import org.jboss.tools.common.text.xml.MarkerAnnotationInfo.AnnotationInfo;
+
+public class BaseQuickAssistProcessor implements IQuickAssistProcessor {
+
+ public String getErrorMessage() {
+ return null;
+ }
+
+ public boolean canFix(Annotation annotation) {
+ if(annotation instanceof SimpleMarkerAnnotation || annotation instanceof TemporaryAnnotation)
+ return true;
+ return false;
+ }
+
+ public boolean canAssist(IQuickAssistInvocationContext invocationContext) {
+ return false;
+ }
+
+ public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
+ List<AnnotationInfo> all = new ArrayList<AnnotationInfo>();
+ List<AnnotationInfo> high = new ArrayList<AnnotationInfo>();
+ List<AnnotationInfo> low = new ArrayList<AnnotationInfo>();
+
+ IAnnotationModel model = invocationContext.getSourceViewer().getAnnotationModel();
+ if (model != null) {
+ Iterator<Annotation> iterator = model.getAnnotationIterator();
+ while (iterator.hasNext()) {
+ Annotation annotation = (Annotation) iterator.next();
+ if (!canFix(annotation))
+ continue;
+
+ Position position = model.getPosition(annotation);
+
+ if (position.overlapsWith(invocationContext.getOffset(), 1)) {
+ AnnotationInfo info = new AnnotationInfo(annotation, position);
+ if(info.isTop())
+ high.add(info);
+ else
+ low.add(info);
+ }
+ }
+ all.addAll(high);
+ all.addAll(low);
+ }
+ MarkerAnnotationInfo mai = new MarkerAnnotationInfo(all, invocationContext.getSourceViewer());
+ List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ for(AnnotationInfo info : all){
+ proposals.addAll(mai.getCompletionProposals(info));
+ }
+ return proposals.toArray(new ICompletionProposal[]{});
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/BaseQuickAssistProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/JBDSQuickAssistProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/JBDSQuickAssistProcessor.java 2012-01-10 17:40:29 UTC (rev 37746)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/JBDSQuickAssistProcessor.java 2012-01-10 18:59:00 UTC (rev 37747)
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.common.text.xml;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
-import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;
-import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.jboss.tools.common.text.xml.MarkerAnnotationInfo.AnnotationInfo;
-
-public class JBDSQuickAssistProcessor implements IQuickAssistProcessor {
-
- public String getErrorMessage() {
- return null;
- }
-
- public boolean canFix(Annotation annotation) {
- if(annotation instanceof SimpleMarkerAnnotation || annotation instanceof TemporaryAnnotation)
- return true;
- return false;
- }
-
- public boolean canAssist(IQuickAssistInvocationContext invocationContext) {
- return false;
- }
-
- public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
- List<AnnotationInfo> all = new ArrayList<AnnotationInfo>();
- List<AnnotationInfo> high = new ArrayList<AnnotationInfo>();
- List<AnnotationInfo> low = new ArrayList<AnnotationInfo>();
-
- IAnnotationModel model = invocationContext.getSourceViewer().getAnnotationModel();
- if (model != null) {
- Iterator<Annotation> iterator = model.getAnnotationIterator();
- while (iterator.hasNext()) {
- Annotation annotation = (Annotation) iterator.next();
- if (!canFix(annotation))
- continue;
-
- Position position = model.getPosition(annotation);
-
- if (position.overlapsWith(invocationContext.getOffset(), 1)) {
- AnnotationInfo info = new AnnotationInfo(annotation, position);
- if(info.isTop())
- high.add(info);
- else
- low.add(info);
- }
- }
- all.addAll(high);
- all.addAll(low);
- }
- MarkerAnnotationInfo mai = new MarkerAnnotationInfo(all, invocationContext.getSourceViewer());
- List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
- for(AnnotationInfo info : all){
- proposals.addAll(mai.getCompletionProposals(info));
- }
- return proposals.toArray(new ICompletionProposal[]{});
- }
-
-}
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2012-01-10 17:40:29 UTC (rev 37746)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2012-01-10 18:59:00 UTC (rev 37747)
@@ -263,7 +263,7 @@
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
if (fQuickAssistant == null) {
IQuickAssistAssistant assistant = new QuickAssistAssistant();
- assistant.setQuickAssistProcessor(new JBDSQuickAssistProcessor());
+ assistant.setQuickAssistProcessor(new BaseQuickAssistProcessor());
assistant.setInformationControlCreator(getQuickAssistAssistantInformationControlCreator());
if (fPreferenceStore != null) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/HTMLTextViewerConfiguration.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/HTMLTextViewerConfiguration.java 2012-01-10 17:40:29 UTC (rev 37746)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/HTMLTextViewerConfiguration.java 2012-01-10 18:59:00 UTC (rev 37747)
@@ -50,7 +50,7 @@
import org.eclipse.wst.sse.ui.internal.taginfo.TextHoverManager;
import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkDetector;
-import org.jboss.tools.common.text.xml.JBDSQuickAssistProcessor;
+import org.jboss.tools.common.text.xml.BaseQuickAssistProcessor;
import org.jboss.tools.common.text.xml.contentassist.ProposalSorter;
import org.jboss.tools.common.text.xml.info.ChainTextHover;
import org.jboss.tools.common.text.xml.info.TextHoverInformationProvider;
@@ -282,7 +282,7 @@
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
if (fQuickAssistant == null) {
IQuickAssistAssistant assistant = new QuickAssistAssistant();
- assistant.setQuickAssistProcessor(new JBDSQuickAssistProcessor());
+ assistant.setQuickAssistProcessor(new BaseQuickAssistProcessor());
assistant.setInformationControlCreator(getQuickAssistAssistantInformationControlCreator());
if (fPreferenceStore != null) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JSPTextViewerConfiguration.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JSPTextViewerConfiguration.java 2012-01-10 17:40:29 UTC (rev 37746)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JSPTextViewerConfiguration.java 2012-01-10 18:59:00 UTC (rev 37747)
@@ -43,7 +43,7 @@
import org.eclipse.wst.sse.ui.internal.taginfo.TextHoverManager;
import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkDetector;
-import org.jboss.tools.common.text.xml.JBDSQuickAssistProcessor;
+import org.jboss.tools.common.text.xml.BaseQuickAssistProcessor;
import org.jboss.tools.common.text.xml.contentassist.ProposalSorter;
import org.jboss.tools.common.text.xml.info.ChainTextHover;
import org.jboss.tools.common.text.xml.info.TextHoverInformationProvider;
@@ -262,7 +262,7 @@
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
if (fQuickAssistant == null) {
IQuickAssistAssistant assistant = new QuickAssistAssistant();
- assistant.setQuickAssistProcessor(new JBDSQuickAssistProcessor());
+ assistant.setQuickAssistProcessor(new BaseQuickAssistProcessor());
assistant.setInformationControlCreator(getQuickAssistAssistantInformationControlCreator());
if (fPreferenceStore != null) {
12 years, 11 months
JBoss Tools SVN: r37746 - in trunk: cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-10 12:40:29 -0500 (Tue, 10 Jan 2012)
New Revision: 37746
Added:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/BaseRefactoringWizard.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java
Removed:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/JBDSRefactoringWizard.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/JBDSFileChange.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/RenameNamedBeanWizard.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AbstractModifyInjectionPointWizard.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java
Log:
Renamed JBDSFileChange -> BaseFileChange, JBDSRefactoringWizard -> BaseRefactoringWizard
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -27,7 +27,7 @@
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.common.EclipseUtil;
-import org.jboss.tools.common.refactoring.JBDSFileChange;
+import org.jboss.tools.common.refactoring.BaseFileChange;
public class AddQualifiersToBeanProcessor extends CDIRefactoringProcessor {
protected IBean selectedBean;
@@ -90,7 +90,7 @@
ICompilationUnit compilationUnit = original.getWorkingCopy(pm);
- JBDSFileChange fileChange = new JBDSFileChange(file);
+ BaseFileChange fileChange = new BaseFileChange(file);
MultiTextEdit edit = new MultiTextEdit();
@@ -106,7 +106,7 @@
fileChange.setEdit(edit);
rootChange.add(fileChange);
}
- fileChange = new JBDSFileChange(file2);
+ fileChange = new BaseFileChange(file2);
edit = new MultiTextEdit();
}else{
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -25,12 +25,12 @@
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
-import org.jboss.tools.common.refactoring.JBDSFileChange;
+import org.jboss.tools.common.refactoring.BaseFileChange;
public abstract class CDIRefactoringProcessor extends AbstractCDIProcessor {
protected IFile file;
- protected JBDSFileChange change;
+ protected BaseFileChange change;
protected IClassBean bean;
public CDIRefactoringProcessor(IFile file, String label){
@@ -44,7 +44,7 @@
protected void createRootChange(){
rootChange = new CompositeChange(getLabel());
- change = new JBDSFileChange(file);
+ change = new BaseFileChange(file);
MultiTextEdit root = new MultiTextEdit();
change.setEdit(root);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -29,14 +29,14 @@
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
import org.jboss.tools.common.model.project.ProjectHome;
-import org.jboss.tools.common.refactoring.JBDSFileChange;
+import org.jboss.tools.common.refactoring.BaseFileChange;
import org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher;
/**
* @author Daniel Azarov
*/
public abstract class CDIRenameProcessor extends AbstractCDIProcessor {
- protected JBDSFileChange lastChange;
+ protected BaseFileChange lastChange;
protected IFile declarationFile=null;
private String newName;
@@ -85,18 +85,18 @@
}
// lets collect all changes for the same files in one MultiTextEdit
- protected JBDSFileChange getChange(IFile file){
+ protected BaseFileChange getChange(IFile file){
if(lastChange != null && lastChange.getFile().equals(file))
return lastChange;
for(int i=0; i < rootChange.getChildren().length; i++){
- JBDSFileChange change = (JBDSFileChange)rootChange.getChildren()[i];
+ BaseFileChange change = (BaseFileChange)rootChange.getChildren()[i];
if(change.getFile().equals(file)){
lastChange = change;
return lastChange;
}
}
- lastChange = new JBDSFileChange(file);
+ lastChange = new BaseFileChange(file);
MultiTextEdit root = new MultiTextEdit();
lastChange.setEdit(root);
@@ -116,7 +116,7 @@
protected void change(IFile file, int offset, int length, String text){
String key = file.getFullPath().toString()+" "+offset;
if(!keys.contains(key)){
- JBDSFileChange change = getChange(file);
+ BaseFileChange change = getChange(file);
TextEdit edit = new ReplaceEdit(offset, length, text);
change.addEdit(edit);
keys.add(key);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/RenameNamedBeanWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/RenameNamedBeanWizard.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/RenameNamedBeanWizard.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -24,7 +24,7 @@
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.internal.core.refactoring.RenameNamedBeanProcessor;
import org.jboss.tools.cdi.ui.CDIUIMessages;
-import org.jboss.tools.common.ui.refactoring.JBDSRefactoringWizard;
+import org.jboss.tools.common.ui.refactoring.BaseRefactoringWizard;
import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.common.ui.widget.editor.IFieldEditorFactory;
@@ -32,7 +32,7 @@
/**
* @author Daniel Azarov
*/
-public class RenameNamedBeanWizard extends JBDSRefactoringWizard {
+public class RenameNamedBeanWizard extends BaseRefactoringWizard {
private IBean bean;
private String componentName;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AbstractModifyInjectionPointWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AbstractModifyInjectionPointWizard.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AbstractModifyInjectionPointWizard.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -23,9 +23,9 @@
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.internal.core.refactoring.AddQualifiersToBeanProcessor;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
-import org.jboss.tools.common.ui.refactoring.JBDSRefactoringWizard;
+import org.jboss.tools.common.ui.refactoring.BaseRefactoringWizard;
-public abstract class AbstractModifyInjectionPointWizard extends JBDSRefactoringWizard {
+public abstract class AbstractModifyInjectionPointWizard extends BaseRefactoringWizard {
public AbstractModifyInjectionPointWizard(ProcessorBasedRefactoring refactoring){
super(refactoring, RefactoringWizard.WIZARD_BASED_USER_INTERFACE);
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -17,9 +17,9 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.common.ui.refactoring.JBDSRefactoringWizard;
+import org.jboss.tools.common.ui.refactoring.BaseRefactoringWizard;
-public class DeletePreviewWizard extends JBDSRefactoringWizard {
+public class DeletePreviewWizard extends BaseRefactoringWizard {
public DeletePreviewWizard(Refactoring refactoring) {
super(refactoring, RefactoringWizard.WIZARD_BASED_USER_INTERFACE);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -47,7 +47,7 @@
import org.jboss.tools.cdi.ui.marker.TestableResolutionWithRefactoringProcessor;
import org.jboss.tools.common.base.test.AbstractRefactorTest.TestChangeStructure;
import org.jboss.tools.common.base.test.validation.TestUtil;
-import org.jboss.tools.common.refactoring.JBDSFileChange;
+import org.jboss.tools.common.refactoring.BaseFileChange;
import org.jboss.tools.common.ui.marker.AddSuppressWarningsMarkerResolution;
import org.jboss.tools.common.ui.marker.ConfigureProblemSeverityMarkerResolution;
import org.jboss.tools.common.util.FileUtil;
Copied: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java (from rev 37745, trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/JBDSFileChange.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.common.refactoring;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.MultiStateTextFileChange;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.text.edits.TextEdit;
+import org.eclipse.text.edits.UndoEdit;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.UIJob;
+import org.jboss.tools.common.CommonPlugin;
+
+public class BaseFileChange extends MultiStateTextFileChange{
+ private IFile file;
+ private BaseTextChange rootChange = null;
+
+ public BaseFileChange(IFile file) {
+ super(file.getName(), file);
+ this.file = file;
+
+ setSaveMode();
+ }
+
+ private void setSaveMode(){
+ UIJob job = new UIJob("setSaveMode"){ //$NON-NLS-1$
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ try {
+ if(isOpenInEditor(file)){
+ setSaveMode(TextFileChange.LEAVE_DIRTY);
+ }else{
+ setSaveMode(TextFileChange.FORCE_SAVE);
+ }
+ } catch (PartInitException e) {
+ CommonPlugin.getDefault().logError(e);
+ }
+ return Status.OK_STATUS;
+ }};
+
+ job.setSystem(true);
+ job.schedule();
+ }
+
+ private static boolean isOpenInEditor(IFile file) throws PartInitException{
+ IEditorInput input = EditorUtility.getEditorInput(file);
+ for(IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()){
+ for(IWorkbenchPage page : window.getPages()){
+ for(IEditorReference editorReference : page.getEditorReferences()){
+ IEditorPart editor = editorReference.getEditor(true);
+ if(editor != null && editor.getEditorInput().equals(input)){
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public IFile getFile(){
+ return file;
+ }
+
+ public void setEdit(TextEdit edit) {
+ rootChange = new BaseTextChange();
+ rootChange.setEdit(edit);
+ super.addChange(rootChange);
+ }
+
+ public TextEdit getEdit(){
+ return rootChange.getEdit();
+ }
+
+ public void addEdit(TextEdit edit){
+ rootChange.addEdit(edit);
+ }
+
+ class BaseTextChange extends TextChange{
+
+ protected BaseTextChange() {
+ super("");
+ }
+
+ @Override
+ protected IDocument acquireDocument(IProgressMonitor pm)
+ throws CoreException {
+ return null;
+ }
+
+ @Override
+ protected void commit(IDocument document, IProgressMonitor pm)
+ throws CoreException {
+ }
+
+ @Override
+ protected void releaseDocument(IDocument document, IProgressMonitor pm)
+ throws CoreException {
+ }
+
+ @Override
+ protected Change createUndoChange(UndoEdit edit) {
+ return null;
+ }
+
+ @Override
+ public void initializeValidationData(IProgressMonitor pm) {
+ }
+
+ @Override
+ public RefactoringStatus isValid(IProgressMonitor pm)
+ throws CoreException, OperationCanceledException {
+ return null;
+ }
+
+ @Override
+ public Object getModifiedElement() {
+ return null;
+ }
+
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/JBDSFileChange.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/JBDSFileChange.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/JBDSFileChange.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.common.refactoring;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.MultiStateTextFileChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.text.edits.TextEdit;
-import org.eclipse.text.edits.UndoEdit;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.UIJob;
-import org.jboss.tools.common.CommonPlugin;
-
-public class JBDSFileChange extends MultiStateTextFileChange{
- private IFile file;
- private JBDSTextChange rootChange = null;
-
- public JBDSFileChange(IFile file) {
- super(file.getName(), file);
- this.file = file;
-
- setSaveMode();
- }
-
- private void setSaveMode(){
- UIJob job = new UIJob("setSaveMode"){ //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
- try {
- if(isOpenInEditor(file)){
- setSaveMode(TextFileChange.LEAVE_DIRTY);
- }else{
- setSaveMode(TextFileChange.FORCE_SAVE);
- }
- } catch (PartInitException e) {
- CommonPlugin.getDefault().logError(e);
- }
- return Status.OK_STATUS;
- }};
-
- job.setSystem(true);
- job.schedule();
- }
-
- private static boolean isOpenInEditor(IFile file) throws PartInitException{
- IEditorInput input = EditorUtility.getEditorInput(file);
- for(IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()){
- for(IWorkbenchPage page : window.getPages()){
- for(IEditorReference editorReference : page.getEditorReferences()){
- IEditorPart editor = editorReference.getEditor(true);
- if(editor != null && editor.getEditorInput().equals(input)){
- return true;
- }
- }
- }
- }
- return false;
- }
-
- public IFile getFile(){
- return file;
- }
-
- public void setEdit(TextEdit edit) {
- rootChange = new JBDSTextChange();
- rootChange.setEdit(edit);
- super.addChange(rootChange);
- }
-
- public TextEdit getEdit(){
- return rootChange.getEdit();
- }
-
- public void addEdit(TextEdit edit){
- rootChange.addEdit(edit);
- }
-
- class JBDSTextChange extends TextChange{
-
- protected JBDSTextChange() {
- super("");
- }
-
- @Override
- protected IDocument acquireDocument(IProgressMonitor pm)
- throws CoreException {
- return null;
- }
-
- @Override
- protected void commit(IDocument document, IProgressMonitor pm)
- throws CoreException {
- }
-
- @Override
- protected void releaseDocument(IDocument document, IProgressMonitor pm)
- throws CoreException {
- }
-
- @Override
- protected Change createUndoChange(UndoEdit edit) {
- return null;
- }
-
- @Override
- public void initializeValidationData(IProgressMonitor pm) {
- }
-
- @Override
- public RefactoringStatus isValid(IProgressMonitor pm)
- throws CoreException, OperationCanceledException {
- return null;
- }
-
- @Override
- public Object getModifiedElement() {
- return null;
- }
-
- }
-}
Copied: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/BaseRefactoringWizard.java (from rev 37745, trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/JBDSRefactoringWizard.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/BaseRefactoringWizard.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/BaseRefactoringWizard.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.common.ui.refactoring;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+public class BaseRefactoringWizard extends RefactoringWizard {
+
+ public BaseRefactoringWizard(Refactoring refactoring, int flags) {
+ super(refactoring, flags);
+ }
+
+ @Override
+ protected void addUserInputPages() {
+ }
+
+ @Override
+ public boolean performFinish() {
+ boolean result = super.performFinish();
+
+ saveAllEditors();
+
+ return result;
+ }
+
+ private void saveAllEditors(){
+ for(IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()){
+ for(IWorkbenchPage page : window.getPages()){
+ for(IEditorReference eReference : page.getEditorReferences()){
+ IEditorPart editor = eReference.getEditor(true);
+ if(editor != null && editor.isDirty()){
+ editor.doSave(new NullProgressMonitor());
+ }
+ }
+ }
+ }
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/BaseRefactoringWizard.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/JBDSRefactoringWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/JBDSRefactoringWizard.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/refactoring/JBDSRefactoringWizard.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.common.ui.refactoring;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.ltk.core.refactoring.Refactoring;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-public class JBDSRefactoringWizard extends RefactoringWizard {
-
- public JBDSRefactoringWizard(Refactoring refactoring, int flags) {
- super(refactoring, flags);
- }
-
- @Override
- protected void addUserInputPages() {
- }
-
- @Override
- public boolean performFinish() {
- boolean result = super.performFinish();
-
- saveAllEditors();
-
- return result;
- }
-
- private void saveAllEditors(){
- for(IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()){
- for(IWorkbenchPage page : window.getPages()){
- for(IEditorReference eReference : page.getEditorReferences()){
- IEditorPart editor = eReference.getEditor(true);
- if(editor != null && editor.isDirty()){
- editor.doSave(new NullProgressMonitor());
- }
- }
- }
- }
- }
-
-}
Modified: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java 2012-01-10 15:43:21 UTC (rev 37745)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java 2012-01-10 17:40:29 UTC (rev 37746)
@@ -24,7 +24,7 @@
import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
import org.eclipse.text.edits.MultiTextEdit;
-import org.jboss.tools.common.refactoring.JBDSFileChange;
+import org.jboss.tools.common.refactoring.BaseFileChange;
import org.jboss.tools.test.util.JobUtils;
public class AbstractRefactorTest extends TestCase{
@@ -149,9 +149,9 @@
MultiTextEdit edit = null;
IFile file = null;
- if(fileChange instanceof JBDSFileChange){
- edit = (MultiTextEdit)((JBDSFileChange)fileChange).getEdit();
- file = ((JBDSFileChange)fileChange).getFile();
+ if(fileChange instanceof BaseFileChange){
+ edit = (MultiTextEdit)((BaseFileChange)fileChange).getEdit();
+ file = ((BaseFileChange)fileChange).getFile();
//((JBDSFileChange)fileChange).setSaveMode(TextFileChange.FORCE_SAVE);
}else if(fileChange instanceof TextFileChange){
edit = (MultiTextEdit)((TextFileChange)fileChange).getEdit();
12 years, 11 months
JBoss Tools SVN: r37745 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-01-10 10:43:21 -0500 (Tue, 10 Jan 2012)
New Revision: 37745
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp/TmpTest.java
Log:
Debugging info
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp/TmpTest.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp/TmpTest.java 2012-01-10 15:22:29 UTC (rev 37744)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp/TmpTest.java 2012-01-10 15:43:21 UTC (rev 37745)
@@ -1,6 +1,5 @@
package org.jboss.tools.portlet.ui.bot.test.tmp;
-import org.eclipse.core.internal.registry.BundleHelper;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
@@ -23,7 +22,7 @@
if (bundle instanceof BundleHost){
System.out.println("Bundledata class:");
- System.out.println(((BundleHost) bundle).getBundleData());
+ System.out.println(((BundleHost) bundle).getBundleData().getClass());
} else {
System.out.println("No Bundledata");
}
@@ -31,6 +30,6 @@
System.out.println("Jar ext: " + IJ2EEModuleConstants.JAR_EXT);
System.out.println("Comparison: " + bundle.getLocation().endsWith(IJ2EEModuleConstants.JAR_EXT));
System.out.println();
- Thread.sleep(60 * 60 * 1000);
+// Thread.sleep(60 * 60 * 1000);
}
}
12 years, 11 months
JBoss Tools SVN: r37744 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-01-10 10:22:29 -0500 (Tue, 10 Jan 2012)
New Revision: 37744
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp/TmpTest.java
Log:
Debugging info
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp/TmpTest.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp/TmpTest.java 2012-01-10 15:20:27 UTC (rev 37743)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/tmp/TmpTest.java 2012-01-10 15:22:29 UTC (rev 37744)
@@ -1,8 +1,10 @@
package org.jboss.tools.portlet.ui.bot.test.tmp;
+import org.eclipse.core.internal.registry.BundleHelper;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
+import org.eclipse.osgi.framework.internal.core.BundleHost;
import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
@@ -18,6 +20,13 @@
String pluginId = J2EEPlugin.getPlugin().getPluginID();
System.out.println("Plugin id: " + pluginId);
Bundle bundle = Platform.getBundle(pluginId);
+
+ if (bundle instanceof BundleHost){
+ System.out.println("Bundledata class:");
+ System.out.println(((BundleHost) bundle).getBundleData());
+ } else {
+ System.out.println("No Bundledata");
+ }
System.out.println("Location: " + bundle.getLocation());
System.out.println("Jar ext: " + IJ2EEModuleConstants.JAR_EXT);
System.out.println("Comparison: " + bundle.getLocation().endsWith(IJ2EEModuleConstants.JAR_EXT));
12 years, 11 months
JBoss Tools SVN: r37743 - trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-10 10:20:27 -0500 (Tue, 10 Jan 2012)
New Revision: 37743
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java
Log:
[JBIDE-10614] fixed failing test: corrected the name of the plugin that contains the service
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java 2012-01-10 13:20:43 UTC (rev 37742)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java 2012-01-10 15:20:27 UTC (rev 37743)
@@ -30,7 +30,7 @@
public class JBossManagementServiceTest {
private static final String DS_BUNDLEID = "org.eclipse.equinox.ds";
- private static final String AS7MANAGER_PLUGINID = "org.jboss.ide.eclipse.as.management.as7";
+ private static final String AS7MANAGER_PLUGINID = "org.jboss.ide.eclipse.as.management.as71";
@Before
public void setUp() throws UnknownHostException {
12 years, 11 months