JBoss Tools SVN: r15010 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-04 11:46:46 -0400 (Mon, 04 May 2009)
New Revision: 15010
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4263
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2009-05-04 15:21:34 UTC (rev 15009)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2009-05-04 15:46:46 UTC (rev 15010)
@@ -386,6 +386,8 @@
public static String RENAME_SEAM_COMPONENT;
+ public static String SEAM_COMPONENT_RENAME_HANDLER_ERROR;
+
static {
// load message values from bundle file
NLS.initializeMessages(BUNDLE_NAME, SeamUIMessages.class);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2009-05-04 15:21:34 UTC (rev 15009)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2009-05-04 15:46:46 UTC (rev 15010)
@@ -202,3 +202,4 @@
PAGE_ALREADY_EXISTS=Such page already exists!
MASTER_PAGE_ALREADY_EXISTS=Such master page already exists!
RENAME_SEAM_COMPONENT = Rename Seam Component
+SEAM_COMPONENT_RENAME_HANDLER_ERROR = Error
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java 2009-05-04 15:21:34 UTC (rev 15009)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java 2009-05-04 15:46:46 UTC (rev 15010)
@@ -28,6 +28,8 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.refactoring.RenameComponentProcessor;
import org.jboss.tools.seam.internal.core.refactoring.RenameComponentRefactoring;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
+import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.wizard.RenameComponentWizard;
/**
@@ -68,12 +70,14 @@
}
public static void invokeRenameWizard(ISeamComponent component, Shell activeShell) {
+ if(!SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true))
+ return;
RenameComponentProcessor processor = new RenameComponentProcessor(component);
RenameComponentRefactoring refactoring = new RenameComponentRefactoring(processor);
RenameComponentWizard wizard = new RenameComponentWizard(refactoring, component);
RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
try {
- String titleForFailedChecks = "TestTestTest"; //$NON-NLS-1$
+ String titleForFailedChecks = SeamUIMessages.SEAM_COMPONENT_RENAME_HANDLER_ERROR;
op.run(activeShell, titleForFailedChecks);
} catch (final InterruptedException irex) {
// operation was canceled
15 years, 8 months
JBoss Tools SVN: r15009 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-04 11:21:34 -0400 (Mon, 04 May 2009)
New Revision: 15009
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077 Seam refactoring tools
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-04 15:12:37 UTC (rev 15008)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-04 15:21:34 UTC (rev 15009)
@@ -14,6 +14,7 @@
import java.util.Set;
import java.util.StringTokenizer;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -72,7 +73,7 @@
import org.w3c.dom.NodeList;
/**
- * @author Alexey Kazakov
+ * @author Alexey Kazakov, Daniel Azarov
*/
public class RenameComponentProcessor extends RenameProcessor {
private static final String JAVA_EXT = "java";
@@ -121,9 +122,9 @@
}
}
- private void scan(IProject project){
+ private void scan(IContainer container){
try{
- for(IResource resource : project.members()){
+ for(IResource resource : container.members()){
if(resource instanceof IFolder)
scan((IFolder) resource);
else if(resource instanceof IFile)
@@ -133,20 +134,7 @@
SeamCorePlugin.getDefault().logError(ex);
}
}
-
- private void scan(IFolder folder){
- try{
- for(IResource resource : folder.members()){
- if(resource instanceof IFolder)
- scan((IFolder) resource);
- else if(resource instanceof IFile)
- scan((IFile) resource);
- }
- }catch(CoreException ex){
- SeamCorePlugin.getDefault().logError(ex);
- }
- }
-
+
private void scan(IFile file){
String ext = file.getFileExtension();
String content = null;
@@ -162,18 +150,16 @@
scanDOM(file, content);
else if(ext.equalsIgnoreCase(PROPERTIES_EXT))
scanProperties(file, content);
-
}
-
+
private void findDeclarations() throws CoreException{
if(component.getJavaDeclaration() != null)
renameJavaDeclaration(component.getJavaDeclaration());
-
+
Set<ISeamXmlComponentDeclaration> xmlDecls = component.getXmlDeclarations();
-
+
for(ISeamXmlComponentDeclaration xmlDecl : xmlDecls){
- if(xmlDecl != null)
- renameXMLDeclaration(xmlDecl);
+ renameXMLDeclaration(xmlDecl);
}
}
@@ -318,7 +304,7 @@
while(invExp != null){
if(invExp instanceof ELPropertyInvocation){
if(((ELPropertyInvocation)invExp).getQualifiedName() != null && ((ELPropertyInvocation)invExp).getQualifiedName().equals(component.getName()))
- return (ELPropertyInvocation)invExp;
+ return (ELPropertyInvocation)invExp;
else
invExp = invExp.getLeft();
@@ -497,8 +483,6 @@
TextEdit edit = new ReplaceEdit(location.getStartPosition()+location.getLength(), 0, newText);
change.addEdit(edit);
}
-
-
}
/*
15 years, 8 months
JBoss Tools SVN: r15008 - in trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext: hyperlink and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-04 11:12:37 -0400 (Mon, 04 May 2009)
New Revision: 15008
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlinkDetector.java
Log:
JBIDE-4068 Add option (Open On) to open the correspondent Seam component when we have a @In annotation in a field and click on the field name.
Minor changes on the resource name showing
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties 2009-05-04 14:40:33 UTC (rev 15007)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties 2009-05-04 15:12:37 UTC (rev 15008)
@@ -1,5 +1,5 @@
OpenSeamDeclarationAs=Open Declaration of {1} for ''{0}'' {2}
-InResource=in ''{0}''
+InResource=in {0}
SeamComponent=Seam Component
SeamRole=@Role/@Roles
SeamFactory=Seam Factory
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java 2009-05-04 14:40:33 UTC (rev 15007)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java 2009-05-04 15:12:37 UTC (rev 15008)
@@ -39,7 +39,7 @@
public class SeamComponentHyperlink implements IHyperlink {
private IRegion fRegion;
- private ISeamContextVariable fVariable;
+ private String fResourceName;
private IJavaElement fElement;
private IOpenableElement fOpenable;
private String fLabel;
@@ -48,14 +48,13 @@
/**
* Creates a new Seam Component hyperlink.
*/
- SeamComponentHyperlink(IRegion region, ISeamContextVariable variable, IJavaElement element, String name) {
+ SeamComponentHyperlink(IRegion region, String resourceName, IJavaElement element, String name) {
Assert.isNotNull(region);
- Assert.isNotNull(variable);
Assert.isNotNull(element);
Assert.isNotNull(name);
fRegion = region;
- fVariable = variable;
+ fResourceName = resourceName;
fElement = element;
fOpenable = null;
fLabel = SeamExtMessages.SeamFactory;
@@ -65,14 +64,13 @@
/**
* Creates a new Seam Component hyperlink.
*/
- SeamComponentHyperlink(IRegion region, ISeamContextVariable variable, ISeamComponent element, String name) {
+ SeamComponentHyperlink(IRegion region, String resourceName, ISeamComponent element, String name) {
Assert.isNotNull(region);
- Assert.isNotNull(variable);
Assert.isNotNull(element);
Assert.isNotNull(name);
fRegion = region;
- fVariable = variable;
+ fResourceName = resourceName;
fElement = null;
fLabel = SeamExtMessages.SeamComponent;
fName = name;
@@ -95,14 +93,13 @@
/**
* Creates a new Seam Component hyperlink.
*/
- SeamComponentHyperlink(IRegion region, ISeamContextVariable variable, IBijectedAttribute element, String name) {
+ SeamComponentHyperlink(IRegion region, String resourceName, IBijectedAttribute element, String name) {
Assert.isNotNull(region);
- Assert.isNotNull(variable);
Assert.isNotNull(element);
Assert.isNotNull(name);
fRegion = region;
- fVariable = variable;
+ fResourceName = resourceName;
fElement = element.getSourceMember();
fLabel = SeamExtMessages.SeamBijected;
fName = name;
@@ -112,15 +109,14 @@
/**
* Creates a new Seam Component hyperlink.
*/
- SeamComponentHyperlink(IRegion region, ISeamContextVariable variable, IRole element, String name) {
+ SeamComponentHyperlink(IRegion region, String resourceName, IRole element, String name) {
Assert.isNotNull(region);
- Assert.isNotNull(variable);
Assert.isNotNull(element);
Assert.isTrue(element instanceof IOpenableElement);
Assert.isNotNull(name);
fRegion = region;
- fVariable = variable;
+ fResourceName = resourceName;
fElement = null;
fOpenable = (IOpenableElement)element;
fLabel = SeamExtMessages.SeamRole;
@@ -176,12 +172,8 @@
*/
public String getHyperlinkText() {
String formattedIn = "";
- if (fVariable.getResource() != null) {
- String resourceName = fVariable.getResource().getName();
-
- if (resourceName != null && resourceName.trim().length() > 0) {
- formattedIn = MessageFormat.format(SeamExtMessages.InResource, resourceName);
- }
+ if (fResourceName != null && fResourceName.trim().length() > 0) {
+ formattedIn = MessageFormat.format(SeamExtMessages.InResource, fResourceName);
}
return MessageFormat.format(SeamExtMessages.OpenSeamDeclarationAs, fName, fLabel, formattedIn);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlinkDetector.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlinkDetector.java 2009-05-04 14:40:33 UTC (rev 15007)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlinkDetector.java 2009-05-04 15:12:37 UTC (rev 15008)
@@ -41,6 +41,7 @@
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.IRole;
import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamContextShortVariable;
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamMessages;
@@ -170,18 +171,38 @@
}
if (javaElements != null) {
for (IJavaElement javaElement : javaElements) {
- hyperlinks.add(new SeamComponentHyperlink(wordRegion, var, javaElement, nameToSearch));
+ String resourceName = null;
+ if (javaElement.getResource() != null) {
+ resourceName=javaElement.getResource().getName();
+ }
+ hyperlinks.add(new SeamComponentHyperlink(wordRegion, resourceName, javaElement, nameToSearch));
}
}
} else if (var instanceof ISeamComponent) {
- var.getResource().getName();
- hyperlinks.add(new SeamComponentHyperlink(wordRegion, var, (ISeamComponent)var, nameToSearch));
+ String resourceName = null;
+ ISeamComponent comp = (ISeamComponent)var;
+ Set<ISeamComponentDeclaration> decls = comp.getAllDeclarations();
+ for (ISeamComponentDeclaration decl : decls) {
+ if (decl.getResource() != null) {
+ resourceName = decl.getResource().getName();
+ break;
+ }
+ }
+ hyperlinks.add(new SeamComponentHyperlink(wordRegion, resourceName, (ISeamComponent)var, nameToSearch));
} else if (var instanceof IRole) {
- hyperlinks.add(new SeamComponentHyperlink(wordRegion, var, (IRole)var, nameToSearch));
+ String resourceName = null;
+ if (var.getResource() != null) {
+ resourceName = var.getResource().getName();
+ }
+ hyperlinks.add(new SeamComponentHyperlink(wordRegion, resourceName, (IRole)var, nameToSearch));
} else if (var instanceof IBijectedAttribute) {
+ String resourceName = null;
+ if (var.getResource() != null) {
+ resourceName = var.getResource().getName();
+ }
IBijectedAttribute attr = (IBijectedAttribute)var;
if (attr.getSourceMember() != null) {
- hyperlinks.add(new SeamComponentHyperlink(wordRegion, var, (IBijectedAttribute)var, nameToSearch));
+ hyperlinks.add(new SeamComponentHyperlink(wordRegion, resourceName, (IBijectedAttribute)var, nameToSearch));
}
}
}
15 years, 8 months
JBoss Tools SVN: r15007 - in trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test: src/org/hibernate/eclipse/jdt/ui/test/hbmexporter and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-05-04 10:40:33 -0400 (Mon, 04 May 2009)
New Revision: 15007
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/hbm/pack/B.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/hbmexporter/HbmExporterTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4264
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/hbm/pack/B.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/hbm/pack/B.java 2009-05-04 14:39:31 UTC (rev 15006)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/hbm/pack/B.java 2009-05-04 14:40:33 UTC (rev 15007)
@@ -4,7 +4,7 @@
* @author Emmanuel Bernard
*/
public class B {
- private Integer id;
+ private String id;
private int[] testIntArray;
public int[] getTestIntArray() {
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/hbmexporter/HbmExporterTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/hbmexporter/HbmExporterTest.java 2009-05-04 14:39:31 UTC (rev 15006)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/hbmexporter/HbmExporterTest.java 2009-05-04 14:40:33 UTC (rev 15007)
@@ -36,7 +36,6 @@
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.PrimitiveArray;
import org.hibernate.mapping.Property;
-import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.Value;
import org.hibernate.type.IntegerType;
@@ -78,7 +77,7 @@
* @return
*/
protected Configuration getConfigurationFor(String... cuNames){
- Set<ICompilationUnit> selectionCU = new HashSet();
+ Set<ICompilationUnit> selectionCU = new HashSet<ICompilationUnit>();
for (int i = 0; i < cuNames.length; i++) {
ICompilationUnit icu = Utils.findCompilationUnit(javaProject,
cuNames[i]);
15 years, 8 months
JBoss Tools SVN: r15006 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-05-04 10:39:31 -0400 (Mon, 04 May 2009)
New Revision: 15006
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4264
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2009-05-04 14:04:22 UTC (rev 15005)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2009-05-04 14:39:31 UTC (rev 15006)
@@ -512,6 +512,7 @@
while (itVarNames.hasNext()) {
String name = (String)itVarNames.next();
entityInfo.updateAnnotationColumn(name, null, false);
+ entityInfo.addPrimaryIdCandidate(name);
}
}
}
15 years, 8 months
JBoss Tools SVN: r15005 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-04 10:04:22 -0400 (Mon, 04 May 2009)
New Revision: 15005
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4262
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java 2009-05-04 14:02:48 UTC (rev 15004)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java 2009-05-04 14:04:22 UTC (rev 15005)
@@ -51,7 +51,8 @@
public RenameComponentWizard(Refactoring refactoring, ISeamComponent component) {
super(refactoring, WIZARD_BASED_USER_INTERFACE);
this.component = component;
- seamProject = SeamCorePlugin.getSeamProject((IProject)component.getResource(), true);
+ if(component != null)
+ seamProject = SeamCorePlugin.getSeamProject((IProject)component.getResource(), true);
}
/* (non-Javadoc)
15 years, 8 months
JBoss Tools SVN: r15004 - in trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext: hyperlink and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-04 10:02:48 -0400 (Mon, 04 May 2009)
New Revision: 15004
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtMessages.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlinkDetector.java
Log:
JBIDE-4068 Add option (Open On) to open the correspondent Seam component when we have a @In annotation in a field and click on the field name.
The hyperlink description format and contents is changed.
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties 2009-05-04 13:27:08 UTC (rev 15003)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties 2009-05-04 14:02:48 UTC (rev 15004)
@@ -1,5 +1,6 @@
-OpenSeamDeclarationAs=Open Declaration of Seam {1} for ''{0}''
-SeamComponent=Component
-SeamRole=Role
-SeamFactory=Factory
-SeamBijected=Bijected Attribute
+OpenSeamDeclarationAs=Open Declaration of {1} for ''{0}'' {2}
+InResource=in ''{0}''
+SeamComponent=Seam Component
+SeamRole=@Role/@Roles
+SeamFactory=Seam Factory
+SeamBijected=@Out/@DataModel
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtMessages.java 2009-05-04 13:27:08 UTC (rev 15003)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtMessages.java 2009-05-04 14:02:48 UTC (rev 15004)
@@ -21,6 +21,7 @@
private static final String BUNDLE_NAME = "org.jboss.tools.seam.text.ext.Messages"; //$NON-NLS-1$
public static String OpenSeamDeclarationAs;
+ public static String InResource;
public static String SeamComponent;
public static String SeamRole;
public static String SeamFactory;
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java 2009-05-04 13:27:08 UTC (rev 15003)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java 2009-05-04 14:02:48 UTC (rev 15004)
@@ -26,6 +26,7 @@
import org.jboss.tools.seam.core.IRole;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
import org.jboss.tools.seam.text.ext.SeamExtMessages;
import org.jboss.tools.seam.text.ext.SeamExtPlugin;
@@ -38,6 +39,7 @@
public class SeamComponentHyperlink implements IHyperlink {
private IRegion fRegion;
+ private ISeamContextVariable fVariable;
private IJavaElement fElement;
private IOpenableElement fOpenable;
private String fLabel;
@@ -46,12 +48,14 @@
/**
* Creates a new Seam Component hyperlink.
*/
- SeamComponentHyperlink(IRegion region, IJavaElement element, String name) {
+ SeamComponentHyperlink(IRegion region, ISeamContextVariable variable, IJavaElement element, String name) {
Assert.isNotNull(region);
+ Assert.isNotNull(variable);
Assert.isNotNull(element);
Assert.isNotNull(name);
fRegion = region;
+ fVariable = variable;
fElement = element;
fOpenable = null;
fLabel = SeamExtMessages.SeamFactory;
@@ -61,12 +65,14 @@
/**
* Creates a new Seam Component hyperlink.
*/
- SeamComponentHyperlink(IRegion region, ISeamComponent element, String name) {
+ SeamComponentHyperlink(IRegion region, ISeamContextVariable variable, ISeamComponent element, String name) {
Assert.isNotNull(region);
+ Assert.isNotNull(variable);
Assert.isNotNull(element);
Assert.isNotNull(name);
fRegion = region;
+ fVariable = variable;
fElement = null;
fLabel = SeamExtMessages.SeamComponent;
fName = name;
@@ -89,12 +95,14 @@
/**
* Creates a new Seam Component hyperlink.
*/
- SeamComponentHyperlink(IRegion region, IBijectedAttribute element, String name) {
+ SeamComponentHyperlink(IRegion region, ISeamContextVariable variable, IBijectedAttribute element, String name) {
Assert.isNotNull(region);
+ Assert.isNotNull(variable);
Assert.isNotNull(element);
Assert.isNotNull(name);
fRegion = region;
+ fVariable = variable;
fElement = element.getSourceMember();
fLabel = SeamExtMessages.SeamBijected;
fName = name;
@@ -104,13 +112,15 @@
/**
* Creates a new Seam Component hyperlink.
*/
- SeamComponentHyperlink(IRegion region, IRole element, String name) {
+ SeamComponentHyperlink(IRegion region, ISeamContextVariable variable, IRole element, String name) {
Assert.isNotNull(region);
+ Assert.isNotNull(variable);
Assert.isNotNull(element);
Assert.isTrue(element instanceof IOpenableElement);
Assert.isNotNull(name);
fRegion = region;
+ fVariable = variable;
fElement = null;
fOpenable = (IOpenableElement)element;
fLabel = SeamExtMessages.SeamRole;
@@ -165,7 +175,15 @@
* @see IHyperlink#getHyperlinkText()
*/
public String getHyperlinkText() {
- return MessageFormat.format(SeamExtMessages.OpenSeamDeclarationAs, fName, fLabel);
+ String formattedIn = "";
+ if (fVariable.getResource() != null) {
+ String resourceName = fVariable.getResource().getName();
+
+ if (resourceName != null && resourceName.trim().length() > 0) {
+ formattedIn = MessageFormat.format(SeamExtMessages.InResource, resourceName);
+ }
+ }
+ return MessageFormat.format(SeamExtMessages.OpenSeamDeclarationAs, fName, fLabel, formattedIn);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlinkDetector.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlinkDetector.java 2009-05-04 13:27:08 UTC (rev 15003)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlinkDetector.java 2009-05-04 14:02:48 UTC (rev 15004)
@@ -170,17 +170,18 @@
}
if (javaElements != null) {
for (IJavaElement javaElement : javaElements) {
- hyperlinks.add(new SeamComponentHyperlink(wordRegion, javaElement, nameToSearch));
+ hyperlinks.add(new SeamComponentHyperlink(wordRegion, var, javaElement, nameToSearch));
}
}
} else if (var instanceof ISeamComponent) {
- hyperlinks.add(new SeamComponentHyperlink(wordRegion, (ISeamComponent)var, nameToSearch));
+ var.getResource().getName();
+ hyperlinks.add(new SeamComponentHyperlink(wordRegion, var, (ISeamComponent)var, nameToSearch));
} else if (var instanceof IRole) {
- hyperlinks.add(new SeamComponentHyperlink(wordRegion, (IRole)var, nameToSearch));
+ hyperlinks.add(new SeamComponentHyperlink(wordRegion, var, (IRole)var, nameToSearch));
} else if (var instanceof IBijectedAttribute) {
IBijectedAttribute attr = (IBijectedAttribute)var;
if (attr.getSourceMember() != null) {
- hyperlinks.add(new SeamComponentHyperlink(wordRegion, (IBijectedAttribute)var, nameToSearch));
+ hyperlinks.add(new SeamComponentHyperlink(wordRegion, var, (IBijectedAttribute)var, nameToSearch));
}
}
}
15 years, 8 months
JBoss Tools SVN: r15003 - trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-04 09:27:08 -0400 (Mon, 04 May 2009)
New Revision: 15003
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties
Log:
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties 2009-05-04 13:14:43 UTC (rev 15002)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties 2009-05-04 13:27:08 UTC (rev 15003)
@@ -1,4 +1,4 @@
-OpenSeamDeclarationAs=Open Declaration of ''{0}'' as Seam {1}
+OpenSeamDeclarationAs=Open Declaration of Seam {1} for ''{0}''
SeamComponent=Component
SeamRole=Role
SeamFactory=Factory
15 years, 8 months
JBoss Tools SVN: r15002 - in trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext: hyperlink and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-04 09:14:43 -0400 (Mon, 04 May 2009)
New Revision: 15002
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtMessages.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java
Log:
JBIDE-4068 Add option (Open On) to open the correspondent Seam component when we have a @In annotation in a field and click on the field name.
The name of hyperlink is changed.
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties 2009-05-04 12:35:55 UTC (rev 15001)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/Messages.properties 2009-05-04 13:14:43 UTC (rev 15002)
@@ -1,4 +1,4 @@
-OpenAs=Open ''{0}'' as {1}
+OpenSeamDeclarationAs=Open Declaration of ''{0}'' as Seam {1}
SeamComponent=Component
SeamRole=Role
SeamFactory=Factory
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtMessages.java 2009-05-04 12:35:55 UTC (rev 15001)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtMessages.java 2009-05-04 13:14:43 UTC (rev 15002)
@@ -20,7 +20,7 @@
public class SeamExtMessages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.tools.seam.text.ext.Messages"; //$NON-NLS-1$
- public static String OpenAs;
+ public static String OpenSeamDeclarationAs;
public static String SeamComponent;
public static String SeamRole;
public static String SeamFactory;
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java 2009-05-04 12:35:55 UTC (rev 15001)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamComponentHyperlink.java 2009-05-04 13:14:43 UTC (rev 15002)
@@ -165,7 +165,7 @@
* @see IHyperlink#getHyperlinkText()
*/
public String getHyperlinkText() {
- return MessageFormat.format(SeamExtMessages.OpenAs, fName, fLabel);
+ return MessageFormat.format(SeamExtMessages.OpenSeamDeclarationAs, fName, fLabel);
}
15 years, 8 months
JBoss Tools SVN: r15001 - trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-05-04 08:35:55 -0400 (Mon, 04 May 2009)
New Revision: 15001
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JDTuiAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3457
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JDTuiAllTests.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JDTuiAllTests.java 2009-05-04 12:08:45 UTC (rev 15000)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JDTuiAllTests.java 2009-05-04 12:35:55 UTC (rev 15001)
@@ -1,5 +1,7 @@
package org.hibernate.eclipse.jdt.ui.test;
+import org.hibernate.eclipse.jdt.ui.test.hbmexporter.HbmExporterTest;
+
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -13,6 +15,7 @@
//suite.addTestSuite(HibernateErrorsTest2.class);
suite.addTestSuite(HQLQueryValidatorTest.class);
suite.addTestSuite(ELTransformerTest.class);
+ suite.addTestSuite(HbmExporterTest.class);
//$JUnit-END$
return suite;
}
15 years, 8 months