JBoss Tools SVN: r29354 - trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-25 16:58:10 -0500 (Fri, 25 Feb 2011)
New Revision: 29354
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/BPELUtils.java
Log:
https://issues.jboss.org/browse/JBIDE-8068
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/BPELUtils.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/BPELUtils.java 2011-02-25 21:56:09 UTC (rev 29353)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/BPELUtils.java 2011-02-25 21:58:10 UTC (rev 29354)
@@ -50,6 +50,7 @@
import org.eclipse.bpel.model.proxy.OperationProxy;
import org.eclipse.bpel.model.proxy.PortTypeProxy;
import org.eclipse.bpel.model.reordering.IExtensibilityElementListHandler;
+import org.eclipse.bpel.model.resource.BPELReader;
import org.eclipse.bpel.model.resource.BPELResource;
import org.eclipse.bpel.model.resource.BPELResourceSetImpl;
import org.eclipse.bpel.names.NCNameWordDetector;
@@ -1010,5 +1011,12 @@
}
} // copyInto(Node,Node)
-
+
+ // https://issues.jboss.org/browse/JBIDE-8068
+ public static boolean isAbstractProcess(Process process)
+ {
+ Map<String,String>m = BPELUtils.getAllNamespacesForContext(process);
+ boolean result = m.containsValue(BPELConstants.NAMESPACE_ABSTRACT_2007);
+ return result;
+ }
}
13 years, 10 months
JBoss Tools SVN: r29353 - in branches/jbosstools-3.2.x: cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-02-25 16:56:09 -0500 (Fri, 25 Feb 2011)
New Revision: 29353
Modified:
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionRefactoringProcessor.java
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELReferencesQueryParticipant.java
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java
branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
Log:
https://issues.jboss.org/browse/JBIDE-8476
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -26,9 +26,11 @@
public static String CDI_FACET_INSTALL_ABSTRACT_DELEGATE_CHECK_ERROR_LOG_VIEW;
public static String CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR;
- public static String CDI_RENAME_PROCESSOR_OUT_OF_SYNC_FILE;
- public static String CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE;
+ public static String CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT;
public static String CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE;
+ public static String CDI_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE;
+ public static String CDI_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE;
+
public static String RENAME_NAMED_BEAN_PROCESSOR_TITLE;
public static String RENAME_NAMED_BEAN_PROCESSOR_ERROR;
public static String CDI_RENAME_PROCESSOR_BEAN_HAS_NO_FILE;
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2011-02-25 21:56:09 UTC (rev 29353)
@@ -1,9 +1,10 @@
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR=Error
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERRORS_OCCURED=Error occured during installing CDI facet
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_CHECK_ERROR_LOG_VIEW=Check Errors View for details
-CDI_RENAME_PROCESSOR_OUT_OF_SYNC_FILE=Cannot change file. File ''{0}'' is not in sync.
-CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
+CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
+CDI_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE=Read-only File Encountered
+CDI_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
RENAME_NAMED_BEAN_PROCESSOR_TITLE=Rename @Named Bean
RENAME_NAMED_BEAN_PROCESSOR_ERROR=This is not a @Named Bean
CDI_RENAME_PROCESSOR_BEAN_HAS_NO_FILE=Named Bean does not have a file
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -24,7 +23,7 @@
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -121,22 +120,6 @@
change(declarationFile, nameLocation.getStartPosition(), nameLocation.getLength(), newText);
}
-
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isPhantom()){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isReadOnly()){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
- return false;
- }
- return true;
- }
-
-
protected void renameBean(IProgressMonitor pm, IBean bean)throws CoreException{
pm.beginTask("", 3);
@@ -179,13 +162,16 @@
}
@Override
- protected boolean isFileCorrect(IFile file) {
- return CDIRenameProcessor.this.isFileCorrect(file);
+ protected void outOfSynch(IProject project) {
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
@Override
protected void match(IFile file, int offset, int length) {
- change(file, offset, length, newName);
+ if(isFileReadOnly(file)){
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ }else
+ change(file, offset, length, newName);
}
protected ELInvocationExpression findComponentReference(ELInvocationExpression invocationExpression){
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionRefactoringProcessor.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionRefactoringProcessor.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionRefactoringProcessor.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -26,7 +26,7 @@
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -107,13 +107,12 @@
private boolean isFileCorrect(IFile file){
if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
return false;
}else if(file.isPhantom()){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
return false;
}else if(file.isReadOnly()){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
return false;
}
return true;
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -23,9 +23,11 @@
public static String StringTokenDescription_Name;
public static String WhiteSpaceTokenDescription_Name;
- public static String EL_RENAME_PROCESSOR_OUT_OF_SYNC_FILE;
- public static String EL_RENAME_PROCESSOR_ERROR_PHANTOM_FILE;
+ public static String EL_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT;
public static String EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE;
+ public static String EL_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE;
+ public static String EL_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE;
+
public static String RENAME_EL_VARIABLE_PROCESSOR_TITLE;
public static String RENAME_MESSAGE_PROPERTY_PROCESSOR_TITLE;
public static String RENAME_EL_VARIABLE_PROCESSOR_CAN_NOT_FIND_EL_VARIABLE;
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties 2011-02-25 21:56:09 UTC (rev 29353)
@@ -16,9 +16,11 @@
PrimitiveValueTokenDescription_Name=Primitive
StringTokenDescription_Name=String
WhiteSpaceTokenDescription_Name=Whitespace
-EL_RENAME_PROCESSOR_OUT_OF_SYNC_FILE=Cannot change file. File ''{0}'' is not in sync.
-EL_RENAME_PROCESSOR_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
+EL_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
+EL_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE=Read-only File Encountered
+EL_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
+
RENAME_EL_VARIABLE_PROCESSOR_TITLE=Rename EL Variable
RENAME_MESSAGE_PROPERTY_PROCESSOR_TITLE=Rename Resource Bundle Message
RENAME_EL_VARIABLE_PROCESSOR_CAN_NOT_FIND_EL_VARIABLE=Can not find EL Variable: ''{0}''.
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.ltk.core.refactoring.CompositeChange;
@@ -23,7 +22,7 @@
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -33,7 +32,6 @@
import org.jboss.tools.common.el.core.resolver.ELResolver;
import org.jboss.tools.common.el.core.resolver.IRelevanceCheck;
import org.jboss.tools.common.model.project.ProjectHome;
-import org.jboss.tools.common.text.ITextSourceReference;
import org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher;
/**
@@ -108,20 +106,6 @@
return lastChange;
}
- private boolean isBadLocation(ITextSourceReference location, IFile file){
- boolean flag;
- if(location == null)
- flag = true;
- else
- flag = location.getStartPosition() == 0 && location.getLength() == 0;
-
-// if(flag)
-// status.addFatalError(Messages.format(ElCoreMessages.EL_RENAME_PROCESSOR_LOCATION_NOT_FOUND, file.getFullPath().toString()));
- return flag;
- }
-
-
-
private void change(IFile file, int offset, int length, String text){
String key = file.getFullPath().toString()+" "+offset;
if(!keys.contains(key)){
@@ -132,21 +116,6 @@
}
}
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(ElCoreMessages.EL_RENAME_PROCESSOR_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isPhantom()){
- status.addFatalError(Messages.format(ElCoreMessages.EL_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isReadOnly()){
- status.addFatalError(Messages.format(ElCoreMessages.EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
- return false;
- }
- return true;
- }
-
-
public class ELSearcher extends RefactorSearcher{
public ELSearcher(IFile file, String oldName){
@@ -191,12 +160,15 @@
@Override
protected void match(IFile file, int offset, int length) {
- change(file, offset, length, newName);
+ if(isFileReadOnly(file)){
+ status.addFatalError(NLS.bind(ElCoreMessages.EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ }else
+ change(file, offset, length, newName);
}
@Override
- protected boolean isFileCorrect(IFile file) {
- return ELRenameProcessor.this.isFileCorrect(file);
+ protected void outOfSynch(IProject project) {
+ status.addFatalError(NLS.bind(ElCoreMessages.EL_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
protected ELInvocationExpression findComponentReference(ELInvocationExpression invocationExpression){
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -23,10 +23,10 @@
import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
import org.jboss.tools.common.el.core.ELReference;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
import org.jboss.tools.common.el.core.ElCoreMessages;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
@@ -89,7 +89,7 @@
RefactoringStatus result = new RefactoringStatus();
if(!validateSegment())
- result.addFatalError(Messages.format(ElCoreMessages.RENAME_MESSAGE_PROPERTY_PROCESSOR_CAN_NOT_FIND_MESSAGE_PROPERTY, getOldName()));
+ result.addFatalError(NLS.bind(ElCoreMessages.RENAME_MESSAGE_PROPERTY_PROCESSOR_CAN_NOT_FIND_MESSAGE_PROPERTY, getOldName()));
return result;
}
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -19,10 +19,12 @@
public static String RENAME_METHOD_PARTICIPANT_GETTER_WARNING;
public static String RENAME_METHOD_PARTICIPANT_SETTER_WARNING;
- public static String RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_FILE;
- public static String RENAME_METHOD_PARTICIPANT_ERROR_PHANTOM_FILE;
+ public static String RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_PROJECT;
public static String RENAME_METHOD_PARTICIPANT_ERROR_READ_ONLY_FILE;
public static String RENAME_METHOD_PARTICIPANT_UPDATE_METHOD_REFERENCES;
+ public static String RENAME_METHOD_PARTICIPANT_QUESTION_DIALOG_TITLE;
+ public static String RENAME_METHOD_PARTICIPANT_QUESTION_DIALOG_MESSAGE;
+
public static String RESOURCE_BUNDLES_RENAME_PARTICIPANT_UPDATE_BUNDLE_REFERENCES;
public static String REFACTOR_CONTRIBUTOR_MAIN_MENU;
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELReferencesQueryParticipant.java
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELReferencesQueryParticipant.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELReferencesQueryParticipant.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -13,7 +13,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -92,15 +91,8 @@
}
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- return false;
- }else if(file.isPhantom()){
- return false;
- }else if(file.isReadOnly()){
- return false;
- }
- return true;
+ protected void outOfSynch(IProject file){
+ // do nothing
}
@Override
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -30,7 +29,7 @@
import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -180,24 +179,16 @@
}
}
- @Override
- protected boolean isFileCorrect(IFile file) {
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(JsfUIMessages.RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isPhantom()){
- status.addFatalError(Messages.format(JsfUIMessages.RENAME_METHOD_PARTICIPANT_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isReadOnly()){
- status.addFatalError(Messages.format(JsfUIMessages.RENAME_METHOD_PARTICIPANT_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
- return false;
- }
- return true;
+ protected void outOfSynch(IProject project){
+ status.addFatalError(NLS.bind(JsfUIMessages.RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
@Override
protected void match(IFile file, int offset, int length) {
- change(file, offset, length, newName);
+ if(isFileReadOnly(file)){
+ status.addFatalError(NLS.bind(JsfUIMessages.RENAME_METHOD_PARTICIPANT_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ }else
+ change(file, offset, length, newName);
}
protected IProject[] getProjects(){
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties 2011-02-25 21:56:09 UTC (rev 29353)
@@ -12,10 +12,11 @@
LinkEditPart_Link=Link
RENAME_METHOD_PARTICIPANT_GETTER_WARNING=Be sure, may be you also should rename setter method to avoid compilation problems.
RENAME_METHOD_PARTICIPANT_SETTER_WARNING=Be sure, may be you also should rename getter method to avoid compilation problems.
-RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_FILE=Cannot change file. File ''{0}'' is not in sync.
-RENAME_METHOD_PARTICIPANT_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
+RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
RENAME_METHOD_PARTICIPANT_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
RENAME_METHOD_PARTICIPANT_UPDATE_METHOD_REFERENCES=Update method references in EL
+RENAME_METHOD_PARTICIPANT_QUESTION_DIALOG_TITLE=Read-only File Encountered
+RENAME_METHOD_PARTICIPANT_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
EL_REFACTOR_RENAME_HANDLER_ERROR=Operation failed
RESOURCE_BUNDLES_RENAME_PARTICIPANT_UPDATE_BUNDLE_REFERENCES=Update bundle references in EL
REFACTOR_CONTRIBUTOR_MAIN_MENU=EL Refactor
Modified: branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
===================================================================
--- branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -11,7 +11,6 @@
package org.jboss.tools.jst.web.kb.refactoring;
import java.io.InputStream;
-import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
@@ -30,13 +29,9 @@
import org.jboss.tools.common.el.core.ELCorePlugin;
import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.model.ELExpression;
-import org.jboss.tools.common.el.core.model.ELInstance;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELMethodInvocation;
-import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
-import org.jboss.tools.common.el.core.parser.ELParser;
-import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolution;
@@ -59,9 +54,9 @@
protected static final String JSP_EXT = "jsp"; //$NON-NLS-1$
protected static final String PROPERTIES_EXT = "properties"; //$NON-NLS-1$
- private static final String GET = "get"; //$NON-NLS-1$
- private static final String SET = "set"; //$NON-NLS-1$
- private static final String IS = "is"; //$NON-NLS-1$
+// private static final String GET = "get"; //$NON-NLS-1$
+// private static final String SET = "set"; //$NON-NLS-1$
+// private static final String IS = "is"; //$NON-NLS-1$
protected static final String SEAM_PROPERTIES_FILE = "seam.properties"; //$NON-NLS-1$
@@ -70,7 +65,6 @@
protected IJavaElement javaElement;
protected IJavaSearchScope searchScope;
-
public RefactorSearcher(IFile baseFile, String propertyName){
this.baseFile = baseFile;
this.propertyName = propertyName;
@@ -106,18 +100,31 @@
if(javaProject != null){
for(IResource resource : EclipseResourceUtil.getJavaSourceRoots(project)){
if(resource instanceof IFolder)
- scanForJava((IFolder) resource);
+ if(!scanForJava((IFolder) resource)){
+ outOfSynch(((IFolder) resource).getProject());
+ return;
+ }
else if(resource instanceof IFile)
- scanForJava((IFile) resource);
+ if(!scanForJava((IFile) resource)){
+ outOfSynch(((IFile) resource).getProject());
+ return;
+ }
}
}
// searching jsp, xhtml and xml files in WebContent folders
- if(getViewFolder(project) != null)
- scan(getViewFolder(project));
- else
- scan(project);
+ if(getViewFolder(project) != null){
+ if(!scan(getViewFolder(project))){
+ outOfSynch(project);
+ return;
+ }
+ }else{
+ if(!scan(project)){
+ outOfSynch(project);
+ return;
+ }
+ }
}
//stopStatistic();
}
@@ -130,36 +137,44 @@
protected abstract IContainer getViewFolder(IProject project);
- private void scanForJava(IContainer container){
+ private boolean scanForJava(IContainer container){
if(container.getName().startsWith(".")) //$NON-NLS-1$
- return;
+ return true;
try{
for(IResource resource : container.members()){
- if(resource instanceof IFolder)
- scanForJava((IFolder) resource);
- else if(resource instanceof IFile)
- scanForJava((IFile) resource);
+ if(resource instanceof IFolder){
+ if(!scanForJava((IFolder) resource))
+ return false;
+ }else if(resource instanceof IFile){
+ if(!scanForJava((IFile) resource))
+ return false;
+ }
}
}catch(CoreException ex){
ELCorePlugin.getDefault().logError(ex);
}
+ return true;
}
- private void scan(IContainer container){
+ private boolean scan(IContainer container){
if(container.getName().startsWith(".")) //$NON-NLS-1$
- return;
+ return true;
try{
for(IResource resource : container.members()){
- if(resource instanceof IFolder)
- scan((IFolder) resource);
- else if(resource instanceof IFile)
- scan((IFile) resource);
+ if(resource instanceof IFolder){
+ if(!scan((IFolder) resource))
+ return false;
+ }else if(resource instanceof IFile){
+ if(!scan((IFile) resource))
+ return false;
+ }
}
}catch(CoreException ex){
ELCorePlugin.getDefault().logError(ex);
}
+ return true;
}
private String getFileContent(IFile file){
@@ -172,32 +187,56 @@
return null;
}
- private void scanForJava(IFile file){
- if(isFileCorrect(file)) {
- if(PROPERTIES_EXT.equalsIgnoreCase(file.getFileExtension())){
- if(file.getName().equals(SEAM_PROPERTIES_FILE)){
- String content = getFileContent(file);
- scanProperties(file, content);
- }else
- searchInCach(file);
- } else if (JAVA_EXT.equalsIgnoreCase(file.getFileExtension())
- || JSP_EXT.equalsIgnoreCase(file.getFileExtension())
- || XHTML_EXT.equalsIgnoreCase(file.getFileExtension())
- || XML_EXT.equalsIgnoreCase(file.getFileExtension())) {
+ /**
+ *
+ * @param file
+ * @return
+ * true - in order to continue searching
+ * false - in order to stop searching
+ */
+ private boolean scanForJava(IFile file){
+ if(isFilePhantom(file))
+ return true;
+
+ if(isFileOutOfSynch(file))
+ return false;
+
+ if(PROPERTIES_EXT.equalsIgnoreCase(file.getFileExtension())){
+ if(file.getName().equals(SEAM_PROPERTIES_FILE)){
+ String content = getFileContent(file);
+ scanProperties(file, content);
+ }else
searchInCach(file);
- }
+ } else if (JAVA_EXT.equalsIgnoreCase(file.getFileExtension())
+ || JSP_EXT.equalsIgnoreCase(file.getFileExtension())
+ || XHTML_EXT.equalsIgnoreCase(file.getFileExtension())
+ || XML_EXT.equalsIgnoreCase(file.getFileExtension())) {
+ searchInCach(file);
}
+ return true;
}
- private void scan(IFile file){
- if(isFileCorrect(file)) {
- String ext = file.getFileExtension();
- if(XML_EXT.equalsIgnoreCase(ext)
- || XHTML_EXT.equalsIgnoreCase(ext)
- || JSP_EXT.equalsIgnoreCase(ext)) {
- searchInCach(file);
- }
+ /**
+ *
+ * @param file
+ * @return
+ * true - in order to continue searching
+ * false - in order to stop searching
+ */
+ private boolean scan(IFile file){
+ if(isFilePhantom(file))
+ return true;
+
+ if(isFileOutOfSynch(file))
+ return false;
+
+ String ext = file.getFileExtension();
+ if(XML_EXT.equalsIgnoreCase(ext)
+ || XHTML_EXT.equalsIgnoreCase(ext)
+ || JSP_EXT.equalsIgnoreCase(ext)) {
+ searchInCach(file);
}
+ return true;
}
protected void searchInCach(IFile file){
@@ -375,8 +414,20 @@
return invocationExpression;
}
- protected abstract boolean isFileCorrect(IFile file);
+ protected boolean isFileOutOfSynch(IFile file){
+ return !file.isSynchronized(IResource.DEPTH_ZERO);
+ }
+ protected boolean isFilePhantom(IFile file){
+ return file.isPhantom();
+ }
+
+ protected boolean isFileReadOnly(IFile file){
+ return file.isReadOnly();
+ }
+
+ protected abstract void outOfSynch(IProject file);
+
protected abstract void match(IFile file, int offset, int length);
protected void checkMatch(IFile file, ELExpression operand, int offset, int length){
Modified: branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
===================================================================
--- branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -55,12 +55,14 @@
public static String RENAME_SEAM_CONTEXT_VARIABLE_PROCESSOR_TITLE;
public static String RENAME_SEAM_CONTEXT_VARIABLE_PROCESSOR_CAN_NOT_FIND_CONTEXT_VARIABLE;
public static String SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR;
- public static String SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_FILE;
- public static String SEAM_RENAME_PROCESSOR_ERROR_PHANTOM_FILE;
+ public static String SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT;
public static String SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE;
public static String SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND;
public static String SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND;
public static String SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION;
+ public static String SEAM_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE;
+ public static String SEAM_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE;
+
public static String SEAM_RENAME_METHOD_PARTICIPANT_SETTER_WARNING;
public static String SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING;
}
\ No newline at end of file
Modified: branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
===================================================================
--- branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2011-02-25 21:56:09 UTC (rev 29353)
@@ -34,11 +34,13 @@
RENAME_SEAM_CONTEXT_VARIABLE_PROCESSOR_TITLE=Rename Seam Context Variable
RENAME_SEAM_CONTEXT_VARIABLE_PROCESSOR_CAN_NOT_FIND_CONTEXT_VARIABLE=Can not find Seam Context Variable: ''{0}''.
SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR=Component ''{0}'' has a declaration which is located in jar file: ''{1}''. Press next to force rename.
-SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_FILE=Cannot change file. File ''{0}'' is not in sync.
+SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND=Location for declaration or annotation not found in file: ''{0}''
SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND=Component: ''{0}'' does not have any declarations
-SEAM_RENAME_PROCESSOR_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION=Declaration of component ''{0}'' is broken.
+SEAM_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE=Read-only File Encountered
+SEAM_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
+
SEAM_RENAME_METHOD_PARTICIPANT_SETTER_WARNING=Be sure, may be you also should rename getter method to avoid compilation problems.
SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING=Be sure, may be you also should rename setter method to avoid compilation problems.
Modified: branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java
===================================================================
--- branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -16,7 +16,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IJavaElement;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
@@ -68,15 +67,8 @@
}
@Override
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- return false;
- }else if(file.isPhantom()){
- return false;
- }else if(file.isReadOnly()){
- return false;
- }
- return true;
+ protected void outOfSynch(IProject file){
+ // do nothing
}
protected void checkMatch(IFile file, ELExpression operand, int offset, int length){
Modified: branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
===================================================================
--- branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2011-02-25 21:47:58 UTC (rev 29352)
+++ branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2011-02-25 21:56:09 UTC (rev 29353)
@@ -17,14 +17,13 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -140,7 +139,7 @@
protected void findAnnotations(){
if(declarationFile == null){
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND, getOldName()));
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND, getOldName()));
return;
}
@@ -183,7 +182,10 @@
for(IBijectedAttribute attribute : attributes){
ITextSourceReference location = attribute.getLocationFor(locationPath);
- changeAnnotation(location, (IFile)attribute.getResource());
+ if(!changeAnnotation(location, (IFile)attribute.getResource())){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, seamProject.getProject().getFullPath().toString()));
+ return;
+ }
}
}
@@ -192,12 +194,16 @@
if(file.getFileExtension().equalsIgnoreCase(JAVA_EXT)){
ITextSourceReference location = factory.getLocationFor(SeamAnnotations.FACTORY_ANNOTATION_TYPE);
- changeAnnotation(location, file);
-
+ if(!changeAnnotation(location, file)){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
+ return;
+ }
}else{
ITextSourceReference location = factory.getLocationFor(ISeamXmlComponentDeclaration.NAME);
- changeXMLNode(location, file);
-
+ if(!changeXMLNode(location, file)){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
+ return;
+ }
}
}
@@ -209,16 +215,19 @@
flag = location.getStartPosition() == 0 && location.getLength() == 0;
if(flag)
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND, file.getFullPath().toString()));
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND, file.getFullPath().toString()));
return flag;
}
- private void changeXMLNode(ITextSourceReference location, IFile file){
+ private boolean changeXMLNode(ITextSourceReference location, IFile file){
if(isBadLocation(location, file))
- return;
+ return true;
- if(!isFileCorrect(file))
- return;
+ if(file.isPhantom())
+ return true;
+
+ if(!file.isSynchronized(IResource.DEPTH_ZERO))
+ return false;
String content = null;
try {
@@ -237,14 +246,18 @@
}else{
change(file, location.getStartPosition(), location.getLength(), getNewName());
}
+ return true;
}
- private void changeAnnotation(ITextSourceReference location, IFile file){
+ private boolean changeAnnotation(ITextSourceReference location, IFile file){
if(isBadLocation(location, file))
- return;
+ return true;
- if(!isFileCorrect(file))
- return;
+ if(file.isPhantom())
+ return true;
+
+ if(!file.isSynchronized(IResource.DEPTH_ZERO))
+ return false;
String content = null;
try {
@@ -289,6 +302,7 @@
String newText = "(\""+getNewName()+"\")"; //$NON-NLS-1$ //$NON-NLS-2$
change(file, location.getStartPosition()+location.getLength(), 0, newText);
}
+ return true;
}
@@ -307,34 +321,33 @@
protected void checkDeclarations(ISeamComponent component) throws CoreException{
if(component.getJavaDeclaration() != null){
if(component.getJavaDeclaration().getResource() == null)
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
else if(SeamUtil.isJar(component.getJavaDeclaration()) && component.getJavaDeclaration().getName() != null)
- status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), component.getJavaDeclaration().getResource().getFullPath().toString()}));
+ status.addInfo(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), component.getJavaDeclaration().getResource().getFullPath().toString()}));
}
Set<ISeamXmlComponentDeclaration> xmlDecls = component.getXmlDeclarations();
for(ISeamXmlComponentDeclaration xmlDecl : xmlDecls){
if(xmlDecl.getResource() == null)
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
else if(SeamUtil.isJar(xmlDecl) && xmlDecl.getName() != null)
- status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), xmlDecl.getResource().getFullPath().toString()}));
+ status.addInfo(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), xmlDecl.getResource().getFullPath().toString()}));
}
}
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isPhantom()){
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isReadOnly()){
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
- return false;
- }
- return true;
- }
+// protected boolean isFileCorrect(IFile file){
+// if(!file.isSynchronized(IResource.DEPTH_ZERO)){
+// status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
+// return false;
+// }else if(file.isPhantom()){
+// return false;
+// }else if(file.isReadOnly()){
+// status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+// return false;
+// }
+// return true;
+// }
private void renameJavaDeclaration(ISeamJavaComponentDeclaration javaDecl) throws CoreException{
IFile file = (IFile)javaDecl.getResource();
@@ -359,19 +372,6 @@
declarationFile = file;
}
-
- private boolean checkFolder(IResource resource, IResource[] sources, IPath output){
- for(IResource folder : sources){
- if(resource.equals(folder))
- return false;
- }
-
- if(resource.getFullPath().equals(output))
- return false;
-
- return true;
- }
-
protected void renameComponent(IProgressMonitor pm, ISeamComponent component)throws CoreException{
pm.beginTask("", 3);
@@ -442,7 +442,10 @@
}
private void change(IFile file, int offset, int length, String text){
- //System.out.println("change file - "+file.getFullPath()+" offset - "+offset+" len - "+length+" text"+text);
+ if(file.isReadOnly()){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ return;
+ }
String key = file.getFullPath().toString()+" "+offset;
if(!keys.contains(key)){
TextFileChange change = getChange(file);
@@ -472,13 +475,16 @@
}
@Override
- protected boolean isFileCorrect(IFile file) {
- return SeamRenameProcessor.this.isFileCorrect(file);
+ protected void outOfSynch(IProject project) {
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
@Override
protected void match(IFile file, int offset, int length) {
- change(file, offset, length, newName);
+ if(isFileReadOnly(file)){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ }else
+ change(file, offset, length, newName);
}
protected ELInvocationExpression findComponentReference(ELInvocationExpression invocationExpression){
13 years, 10 months
JBoss Tools SVN: r29352 - in trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui: commands and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-25 16:47:58 -0500 (Fri, 25 Feb 2011)
New Revision: 29352
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELContentDescriber.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/InsertInContainerCommand.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
Log:
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELContentDescriber.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELContentDescriber.java 2011-02-25 21:43:45 UTC (rev 29351)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELContentDescriber.java 2011-02-25 21:47:58 UTC (rev 29352)
@@ -34,6 +34,8 @@
public class BPELContentDescriber implements ITextContentDescriber {
private static final String WSBPEL_2_NAMESPACE = "http://docs.oasis-open.org/wsbpel/2.0/process/executable"; //$NON-NLS-1$
+ // https://issues.jboss.org/browse/JBIDE-8068
+ private static final String WSBPEL_2_ABSTRACT_NAMESPACE = "http://docs.oasis-open.org/wsbpel/2.0/process/abstract"; //$NON-NLS-1$
private static final String ROOT_ELEMENT = "process"; //$NON-NLS-1$
private RootElementParser parser;
@@ -79,7 +81,8 @@
if (ROOT_ELEMENT.equals(qName.localpart)) {
String namespace = fNamespaceContext.getURI(qName.prefix);
- if (WSBPEL_2_NAMESPACE.equals(namespace))
+ // https://issues.jboss.org/browse/JBIDE-8068
+ if (WSBPEL_2_NAMESPACE.equals(namespace) || WSBPEL_2_ABSTRACT_NAMESPACE.equals(namespace))
throw new AcceptedException(qName.localpart);
else
throw new RejectedException();
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java 2011-02-25 21:43:45 UTC (rev 29351)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java 2011-02-25 21:47:58 UTC (rev 29352)
@@ -690,6 +690,9 @@
public static String Editor_load_error;
public static String Editor_design_page_error;
+ public static String Make_Process_Abstract_Title;
+ public static String Make_Process_Abstract_Message;
+
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/InsertInContainerCommand.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/InsertInContainerCommand.java 2011-02-25 21:43:45 UTC (rev 29351)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/InsertInContainerCommand.java 2011-02-25 21:47:58 UTC (rev 29352)
@@ -11,6 +11,8 @@
package org.eclipse.bpel.ui.commands;
import org.eclipse.bpel.model.Activity;
+import org.eclipse.bpel.model.OpaqueActivity;
+import org.eclipse.bpel.model.Process;
import org.eclipse.bpel.model.util.BPELUtils;
import org.eclipse.bpel.model.util.ReconciliationHelper;
import org.eclipse.bpel.ui.Messages;
@@ -20,7 +22,9 @@
import org.eclipse.bpel.ui.util.BPELUtil;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.PlatformUI;
import org.w3c.dom.Node;
@@ -64,6 +68,22 @@
@Override
public boolean canDoExecute() {
IContainer container = BPELUtil.adapt(parent, IContainer.class);
+
+ // https://issues.jboss.org/browse/JBIDE-8068
+ // Adding an opaque activity will make the process abstract!
+ // Make sure this is what the user had intended.
+ if (child instanceof OpaqueActivity) {
+ Process process = BPELUtils.getProcess(parent);
+ if ( !BPELUtils.isAbstractProcess(process) ) {
+ if (!MessageDialog.openQuestion(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell(),
+ Messages.Make_Process_Abstract_Title,
+ Messages.Make_Process_Abstract_Message)) {
+ return false;
+ }
+ }
+ }
+
return container.canAddObject(parent, child, before);
}
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2011-02-25 21:43:45 UTC (rev 29351)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2011-02-25 21:47:58 UTC (rev 29352)
@@ -129,10 +129,7 @@
BPELPreferencePage_WSIL_EnterLocation = <enter location>
#
# This has \n for a reason. The wrapping in the widget works, but not as expected.
-BPELPreferencePage_WSIL_Description = \
-The document above contains links to other WSIL documents shown below.\n\
-You can add or remove WSIL links to/from the above document.\n\
-The result will be shown in the WSIL browser of the editor.
+BPELPreferencePage_WSIL_Description = The document above contains links to other WSIL documents shown below.\nYou can add or remove WSIL links to/from the above document.\nThe result will be shown in the WSIL browser of the editor.
#
BPELUIRegistry_Expression_language_editors_must_provide_expressionLanguage_and_class__8=Expression language editors must provide expressionLanguage and class.
BPELUtil__unknown_URI__54=<unknown URI>
@@ -685,4 +682,8 @@
EditModelClient_wsdl_load_error=Unable to load the WSDL file {0}\n It may be corrupt, do you want to continue?
EditModelClient_delete_error_title=File Delete Error
-EditModelClient_delete_error_message=Unable to delete the file. See Error Log for more information.
\ No newline at end of file
+EditModelClient_delete_error_message=Unable to delete the file. See Error Log for more information.
+
+Make_Process_Abstract_Title=Warning
+Make_Process_Abstract_Message=Opaque activities are only used in Abstract Processes\n\
+ Would you like to convert this process to make it Abstract?
13 years, 10 months
JBoss Tools SVN: r29351 - in trunk: cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-02-25 16:43:45 -0500 (Fri, 25 Feb 2011)
New Revision: 29351
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
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/marker/MarkerResolutionRefactoringProcessor.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELReferencesQueryParticipant.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
Log:
https://issues.jboss.org/browse/JBIDE-8476
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -26,9 +26,11 @@
public static String CDI_FACET_INSTALL_ABSTRACT_DELEGATE_CHECK_ERROR_LOG_VIEW;
public static String CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR;
- public static String CDI_RENAME_PROCESSOR_OUT_OF_SYNC_FILE;
- public static String CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE;
+ public static String CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT;
public static String CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE;
+ public static String CDI_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE;
+ public static String CDI_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE;
+
public static String RENAME_NAMED_BEAN_PROCESSOR_TITLE;
public static String RENAME_NAMED_BEAN_PROCESSOR_ERROR;
public static String CDI_RENAME_PROCESSOR_BEAN_HAS_NO_FILE;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2011-02-25 21:43:45 UTC (rev 29351)
@@ -1,9 +1,10 @@
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR=Error
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERRORS_OCCURED=Error occured during installing CDI facet
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_CHECK_ERROR_LOG_VIEW=Check Errors View for details
-CDI_RENAME_PROCESSOR_OUT_OF_SYNC_FILE=Cannot change file. File ''{0}'' is not in sync.
-CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
+CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
+CDI_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE=Read-only File Encountered
+CDI_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
RENAME_NAMED_BEAN_PROCESSOR_TITLE=Rename @Named Bean
RENAME_NAMED_BEAN_PROCESSOR_ERROR=This is not a @Named Bean
CDI_RENAME_PROCESSOR_BEAN_HAS_NO_FILE=Named Bean does not have a file
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 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -24,7 +23,7 @@
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -121,22 +120,6 @@
change(declarationFile, nameLocation.getStartPosition(), nameLocation.getLength(), newText);
}
-
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isPhantom()){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isReadOnly()){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
- return false;
- }
- return true;
- }
-
-
protected void renameBean(IProgressMonitor pm, IBean bean)throws CoreException{
pm.beginTask("", 3);
@@ -179,13 +162,16 @@
}
@Override
- protected boolean isFileCorrect(IFile file) {
- return CDIRenameProcessor.this.isFileCorrect(file);
+ protected void outOfSynch(IProject project) {
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
@Override
protected void match(IFile file, int offset, int length) {
- change(file, offset, length, newName);
+ if(isFileReadOnly(file)){
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ }else
+ change(file, offset, length, newName);
}
protected ELInvocationExpression findComponentReference(ELInvocationExpression invocationExpression){
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionRefactoringProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionRefactoringProcessor.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionRefactoringProcessor.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -26,7 +26,7 @@
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -107,13 +107,12 @@
private boolean isFileCorrect(IFile file){
if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
return false;
}else if(file.isPhantom()){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
return false;
}else if(file.isReadOnly()){
- status.addFatalError(Messages.format(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
return false;
}
return true;
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -23,9 +23,11 @@
public static String StringTokenDescription_Name;
public static String WhiteSpaceTokenDescription_Name;
- public static String EL_RENAME_PROCESSOR_OUT_OF_SYNC_FILE;
- public static String EL_RENAME_PROCESSOR_ERROR_PHANTOM_FILE;
+ public static String EL_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT;
public static String EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE;
+ public static String EL_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE;
+ public static String EL_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE;
+
public static String RENAME_EL_VARIABLE_PROCESSOR_TITLE;
public static String RENAME_MESSAGE_PROPERTY_PROCESSOR_TITLE;
public static String RENAME_EL_VARIABLE_PROCESSOR_CAN_NOT_FIND_EL_VARIABLE;
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties 2011-02-25 21:43:45 UTC (rev 29351)
@@ -16,9 +16,11 @@
PrimitiveValueTokenDescription_Name=Primitive
StringTokenDescription_Name=String
WhiteSpaceTokenDescription_Name=Whitespace
-EL_RENAME_PROCESSOR_OUT_OF_SYNC_FILE=Cannot change file. File ''{0}'' is not in sync.
-EL_RENAME_PROCESSOR_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
+EL_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
+EL_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE=Read-only File Encountered
+EL_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
+
RENAME_EL_VARIABLE_PROCESSOR_TITLE=Rename EL Variable
RENAME_MESSAGE_PROPERTY_PROCESSOR_TITLE=Rename Resource Bundle Message
RENAME_EL_VARIABLE_PROCESSOR_CAN_NOT_FIND_EL_VARIABLE=Can not find EL Variable: ''{0}''.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.ltk.core.refactoring.CompositeChange;
@@ -23,7 +22,7 @@
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -33,7 +32,6 @@
import org.jboss.tools.common.el.core.resolver.ELResolver;
import org.jboss.tools.common.el.core.resolver.IRelevanceCheck;
import org.jboss.tools.common.model.project.ProjectHome;
-import org.jboss.tools.common.text.ITextSourceReference;
import org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher;
/**
@@ -108,20 +106,6 @@
return lastChange;
}
- private boolean isBadLocation(ITextSourceReference location, IFile file){
- boolean flag;
- if(location == null)
- flag = true;
- else
- flag = location.getStartPosition() == 0 && location.getLength() == 0;
-
-// if(flag)
-// status.addFatalError(Messages.format(ElCoreMessages.EL_RENAME_PROCESSOR_LOCATION_NOT_FOUND, file.getFullPath().toString()));
- return flag;
- }
-
-
-
private void change(IFile file, int offset, int length, String text){
String key = file.getFullPath().toString()+" "+offset;
if(!keys.contains(key)){
@@ -132,21 +116,6 @@
}
}
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(ElCoreMessages.EL_RENAME_PROCESSOR_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isPhantom()){
- status.addFatalError(Messages.format(ElCoreMessages.EL_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isReadOnly()){
- status.addFatalError(Messages.format(ElCoreMessages.EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
- return false;
- }
- return true;
- }
-
-
public class ELSearcher extends RefactorSearcher{
public ELSearcher(IFile file, String oldName){
@@ -191,12 +160,15 @@
@Override
protected void match(IFile file, int offset, int length) {
- change(file, offset, length, newName);
+ if(isFileReadOnly(file)){
+ status.addFatalError(NLS.bind(ElCoreMessages.EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ }else
+ change(file, offset, length, newName);
}
@Override
- protected boolean isFileCorrect(IFile file) {
- return ELRenameProcessor.this.isFileCorrect(file);
+ protected void outOfSynch(IProject project) {
+ status.addFatalError(NLS.bind(ElCoreMessages.EL_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
protected ELInvocationExpression findComponentReference(ELInvocationExpression invocationExpression){
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -23,10 +23,10 @@
import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
import org.jboss.tools.common.el.core.ELReference;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
import org.jboss.tools.common.el.core.ElCoreMessages;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
@@ -89,7 +89,7 @@
RefactoringStatus result = new RefactoringStatus();
if(!validateSegment())
- result.addFatalError(Messages.format(ElCoreMessages.RENAME_MESSAGE_PROPERTY_PROCESSOR_CAN_NOT_FIND_MESSAGE_PROPERTY, getOldName()));
+ result.addFatalError(NLS.bind(ElCoreMessages.RENAME_MESSAGE_PROPERTY_PROCESSOR_CAN_NOT_FIND_MESSAGE_PROPERTY, getOldName()));
return result;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -19,10 +19,12 @@
public static String RENAME_METHOD_PARTICIPANT_GETTER_WARNING;
public static String RENAME_METHOD_PARTICIPANT_SETTER_WARNING;
- public static String RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_FILE;
- public static String RENAME_METHOD_PARTICIPANT_ERROR_PHANTOM_FILE;
+ public static String RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_PROJECT;
public static String RENAME_METHOD_PARTICIPANT_ERROR_READ_ONLY_FILE;
public static String RENAME_METHOD_PARTICIPANT_UPDATE_METHOD_REFERENCES;
+ public static String RENAME_METHOD_PARTICIPANT_QUESTION_DIALOG_TITLE;
+ public static String RENAME_METHOD_PARTICIPANT_QUESTION_DIALOG_MESSAGE;
+
public static String RESOURCE_BUNDLES_RENAME_PARTICIPANT_UPDATE_BUNDLE_REFERENCES;
public static String REFACTOR_CONTRIBUTOR_MAIN_MENU;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELReferencesQueryParticipant.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELReferencesQueryParticipant.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELReferencesQueryParticipant.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -13,7 +13,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -92,15 +91,8 @@
}
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- return false;
- }else if(file.isPhantom()){
- return false;
- }else if(file.isReadOnly()){
- return false;
- }
- return true;
+ protected void outOfSynch(IProject file){
+ // do nothing
}
@Override
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -30,7 +29,7 @@
import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -180,24 +179,16 @@
}
}
- @Override
- protected boolean isFileCorrect(IFile file) {
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(JsfUIMessages.RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isPhantom()){
- status.addFatalError(Messages.format(JsfUIMessages.RENAME_METHOD_PARTICIPANT_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isReadOnly()){
- status.addFatalError(Messages.format(JsfUIMessages.RENAME_METHOD_PARTICIPANT_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
- return false;
- }
- return true;
+ protected void outOfSynch(IProject project){
+ status.addFatalError(NLS.bind(JsfUIMessages.RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
@Override
protected void match(IFile file, int offset, int length) {
- change(file, offset, length, newName);
+ if(isFileReadOnly(file)){
+ status.addFatalError(NLS.bind(JsfUIMessages.RENAME_METHOD_PARTICIPANT_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ }else
+ change(file, offset, length, newName);
}
protected IProject[] getProjects(){
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties 2011-02-25 21:43:45 UTC (rev 29351)
@@ -12,10 +12,11 @@
LinkEditPart_Link=Link
RENAME_METHOD_PARTICIPANT_GETTER_WARNING=Be sure, may be you also should rename setter method to avoid compilation problems.
RENAME_METHOD_PARTICIPANT_SETTER_WARNING=Be sure, may be you also should rename getter method to avoid compilation problems.
-RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_FILE=Cannot change file. File ''{0}'' is not in sync.
-RENAME_METHOD_PARTICIPANT_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
+RENAME_METHOD_PARTICIPANT_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
RENAME_METHOD_PARTICIPANT_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
RENAME_METHOD_PARTICIPANT_UPDATE_METHOD_REFERENCES=Update method references in EL
+RENAME_METHOD_PARTICIPANT_QUESTION_DIALOG_TITLE=Read-only File Encountered
+RENAME_METHOD_PARTICIPANT_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
EL_REFACTOR_RENAME_HANDLER_ERROR=Operation failed
RESOURCE_BUNDLES_RENAME_PARTICIPANT_UPDATE_BUNDLE_REFERENCES=Update bundle references in EL
REFACTOR_CONTRIBUTOR_MAIN_MENU=EL Refactor
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -11,7 +11,6 @@
package org.jboss.tools.jst.web.kb.refactoring;
import java.io.InputStream;
-import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
@@ -30,13 +29,9 @@
import org.jboss.tools.common.el.core.ELCorePlugin;
import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.model.ELExpression;
-import org.jboss.tools.common.el.core.model.ELInstance;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELMethodInvocation;
-import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
-import org.jboss.tools.common.el.core.parser.ELParser;
-import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolution;
@@ -59,9 +54,9 @@
protected static final String JSP_EXT = "jsp"; //$NON-NLS-1$
protected static final String PROPERTIES_EXT = "properties"; //$NON-NLS-1$
- private static final String GET = "get"; //$NON-NLS-1$
- private static final String SET = "set"; //$NON-NLS-1$
- private static final String IS = "is"; //$NON-NLS-1$
+// private static final String GET = "get"; //$NON-NLS-1$
+// private static final String SET = "set"; //$NON-NLS-1$
+// private static final String IS = "is"; //$NON-NLS-1$
protected static final String SEAM_PROPERTIES_FILE = "seam.properties"; //$NON-NLS-1$
@@ -70,7 +65,6 @@
protected IJavaElement javaElement;
protected IJavaSearchScope searchScope;
-
public RefactorSearcher(IFile baseFile, String propertyName){
this.baseFile = baseFile;
this.propertyName = propertyName;
@@ -106,18 +100,31 @@
if(javaProject != null){
for(IResource resource : EclipseResourceUtil.getJavaSourceRoots(project)){
if(resource instanceof IFolder)
- scanForJava((IFolder) resource);
+ if(!scanForJava((IFolder) resource)){
+ outOfSynch(((IFolder) resource).getProject());
+ return;
+ }
else if(resource instanceof IFile)
- scanForJava((IFile) resource);
+ if(!scanForJava((IFile) resource)){
+ outOfSynch(((IFile) resource).getProject());
+ return;
+ }
}
}
// searching jsp, xhtml and xml files in WebContent folders
- if(getViewFolder(project) != null)
- scan(getViewFolder(project));
- else
- scan(project);
+ if(getViewFolder(project) != null){
+ if(!scan(getViewFolder(project))){
+ outOfSynch(project);
+ return;
+ }
+ }else{
+ if(!scan(project)){
+ outOfSynch(project);
+ return;
+ }
+ }
}
//stopStatistic();
}
@@ -130,36 +137,44 @@
protected abstract IContainer getViewFolder(IProject project);
- private void scanForJava(IContainer container){
+ private boolean scanForJava(IContainer container){
if(container.getName().startsWith(".")) //$NON-NLS-1$
- return;
+ return true;
try{
for(IResource resource : container.members()){
- if(resource instanceof IFolder)
- scanForJava((IFolder) resource);
- else if(resource instanceof IFile)
- scanForJava((IFile) resource);
+ if(resource instanceof IFolder){
+ if(!scanForJava((IFolder) resource))
+ return false;
+ }else if(resource instanceof IFile){
+ if(!scanForJava((IFile) resource))
+ return false;
+ }
}
}catch(CoreException ex){
ELCorePlugin.getDefault().logError(ex);
}
+ return true;
}
- private void scan(IContainer container){
+ private boolean scan(IContainer container){
if(container.getName().startsWith(".")) //$NON-NLS-1$
- return;
+ return true;
try{
for(IResource resource : container.members()){
- if(resource instanceof IFolder)
- scan((IFolder) resource);
- else if(resource instanceof IFile)
- scan((IFile) resource);
+ if(resource instanceof IFolder){
+ if(!scan((IFolder) resource))
+ return false;
+ }else if(resource instanceof IFile){
+ if(!scan((IFile) resource))
+ return false;
+ }
}
}catch(CoreException ex){
ELCorePlugin.getDefault().logError(ex);
}
+ return true;
}
private String getFileContent(IFile file){
@@ -172,32 +187,56 @@
return null;
}
- private void scanForJava(IFile file){
- if(isFileCorrect(file)) {
- if(PROPERTIES_EXT.equalsIgnoreCase(file.getFileExtension())){
- if(file.getName().equals(SEAM_PROPERTIES_FILE)){
- String content = getFileContent(file);
- scanProperties(file, content);
- }else
- searchInCach(file);
- } else if (JAVA_EXT.equalsIgnoreCase(file.getFileExtension())
- || JSP_EXT.equalsIgnoreCase(file.getFileExtension())
- || XHTML_EXT.equalsIgnoreCase(file.getFileExtension())
- || XML_EXT.equalsIgnoreCase(file.getFileExtension())) {
+ /**
+ *
+ * @param file
+ * @return
+ * true - in order to continue searching
+ * false - in order to stop searching
+ */
+ private boolean scanForJava(IFile file){
+ if(isFilePhantom(file))
+ return true;
+
+ if(isFileOutOfSynch(file))
+ return false;
+
+ if(PROPERTIES_EXT.equalsIgnoreCase(file.getFileExtension())){
+ if(file.getName().equals(SEAM_PROPERTIES_FILE)){
+ String content = getFileContent(file);
+ scanProperties(file, content);
+ }else
searchInCach(file);
- }
+ } else if (JAVA_EXT.equalsIgnoreCase(file.getFileExtension())
+ || JSP_EXT.equalsIgnoreCase(file.getFileExtension())
+ || XHTML_EXT.equalsIgnoreCase(file.getFileExtension())
+ || XML_EXT.equalsIgnoreCase(file.getFileExtension())) {
+ searchInCach(file);
}
+ return true;
}
- private void scan(IFile file){
- if(isFileCorrect(file)) {
- String ext = file.getFileExtension();
- if(XML_EXT.equalsIgnoreCase(ext)
- || XHTML_EXT.equalsIgnoreCase(ext)
- || JSP_EXT.equalsIgnoreCase(ext)) {
- searchInCach(file);
- }
+ /**
+ *
+ * @param file
+ * @return
+ * true - in order to continue searching
+ * false - in order to stop searching
+ */
+ private boolean scan(IFile file){
+ if(isFilePhantom(file))
+ return true;
+
+ if(isFileOutOfSynch(file))
+ return false;
+
+ String ext = file.getFileExtension();
+ if(XML_EXT.equalsIgnoreCase(ext)
+ || XHTML_EXT.equalsIgnoreCase(ext)
+ || JSP_EXT.equalsIgnoreCase(ext)) {
+ searchInCach(file);
}
+ return true;
}
protected void searchInCach(IFile file){
@@ -375,8 +414,20 @@
return invocationExpression;
}
- protected abstract boolean isFileCorrect(IFile file);
+ protected boolean isFileOutOfSynch(IFile file){
+ return !file.isSynchronized(IResource.DEPTH_ZERO);
+ }
+ protected boolean isFilePhantom(IFile file){
+ return file.isPhantom();
+ }
+
+ protected boolean isFileReadOnly(IFile file){
+ return file.isReadOnly();
+ }
+
+ protected abstract void outOfSynch(IProject file);
+
protected abstract void match(IFile file, int offset, int length);
protected void checkMatch(IFile file, ELExpression operand, int offset, int length){
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -55,12 +55,14 @@
public static String RENAME_SEAM_CONTEXT_VARIABLE_PROCESSOR_TITLE;
public static String RENAME_SEAM_CONTEXT_VARIABLE_PROCESSOR_CAN_NOT_FIND_CONTEXT_VARIABLE;
public static String SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR;
- public static String SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_FILE;
- public static String SEAM_RENAME_PROCESSOR_ERROR_PHANTOM_FILE;
+ public static String SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT;
public static String SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE;
public static String SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND;
public static String SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND;
public static String SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION;
+ public static String SEAM_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE;
+ public static String SEAM_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE;
+
public static String SEAM_RENAME_METHOD_PARTICIPANT_SETTER_WARNING;
public static String SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING;
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2011-02-25 21:43:45 UTC (rev 29351)
@@ -34,11 +34,13 @@
RENAME_SEAM_CONTEXT_VARIABLE_PROCESSOR_TITLE=Rename Seam Context Variable
RENAME_SEAM_CONTEXT_VARIABLE_PROCESSOR_CAN_NOT_FIND_CONTEXT_VARIABLE=Can not find Seam Context Variable: ''{0}''.
SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR=Component ''{0}'' has a declaration which is located in jar file: ''{1}''. Press next to force rename.
-SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_FILE=Cannot change file. File ''{0}'' is not in sync.
+SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND=Location for declaration or annotation not found in file: ''{0}''
SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND=Component: ''{0}'' does not have any declarations
-SEAM_RENAME_PROCESSOR_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION=Declaration of component ''{0}'' is broken.
+SEAM_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE=Read-only File Encountered
+SEAM_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
+
SEAM_RENAME_METHOD_PARTICIPANT_SETTER_WARNING=Be sure, may be you also should rename getter method to avoid compilation problems.
SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING=Be sure, may be you also should rename setter method to avoid compilation problems.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -16,7 +16,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IJavaElement;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
@@ -68,15 +67,8 @@
}
@Override
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- return false;
- }else if(file.isPhantom()){
- return false;
- }else if(file.isReadOnly()){
- return false;
- }
- return true;
+ protected void outOfSynch(IProject file){
+ // do nothing
}
protected void checkMatch(IFile file, ELExpression operand, int offset, int length){
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2011-02-25 21:30:22 UTC (rev 29350)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2011-02-25 21:43:45 UTC (rev 29351)
@@ -17,14 +17,13 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.ltk.internal.core.refactoring.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -140,7 +139,7 @@
protected void findAnnotations(){
if(declarationFile == null){
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND, getOldName()));
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND, getOldName()));
return;
}
@@ -183,7 +182,10 @@
for(IBijectedAttribute attribute : attributes){
ITextSourceReference location = attribute.getLocationFor(locationPath);
- changeAnnotation(location, (IFile)attribute.getResource());
+ if(!changeAnnotation(location, (IFile)attribute.getResource())){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, seamProject.getProject().getFullPath().toString()));
+ return;
+ }
}
}
@@ -192,12 +194,16 @@
if(file.getFileExtension().equalsIgnoreCase(JAVA_EXT)){
ITextSourceReference location = factory.getLocationFor(SeamAnnotations.FACTORY_ANNOTATION_TYPE);
- changeAnnotation(location, file);
-
+ if(!changeAnnotation(location, file)){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
+ return;
+ }
}else{
ITextSourceReference location = factory.getLocationFor(ISeamXmlComponentDeclaration.NAME);
- changeXMLNode(location, file);
-
+ if(!changeXMLNode(location, file)){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
+ return;
+ }
}
}
@@ -209,16 +215,19 @@
flag = location.getStartPosition() == 0 && location.getLength() == 0;
if(flag)
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND, file.getFullPath().toString()));
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND, file.getFullPath().toString()));
return flag;
}
- private void changeXMLNode(ITextSourceReference location, IFile file){
+ private boolean changeXMLNode(ITextSourceReference location, IFile file){
if(isBadLocation(location, file))
- return;
+ return true;
- if(!isFileCorrect(file))
- return;
+ if(file.isPhantom())
+ return true;
+
+ if(!file.isSynchronized(IResource.DEPTH_ZERO))
+ return false;
String content = null;
try {
@@ -237,14 +246,18 @@
}else{
change(file, location.getStartPosition(), location.getLength(), getNewName());
}
+ return true;
}
- private void changeAnnotation(ITextSourceReference location, IFile file){
+ private boolean changeAnnotation(ITextSourceReference location, IFile file){
if(isBadLocation(location, file))
- return;
+ return true;
- if(!isFileCorrect(file))
- return;
+ if(file.isPhantom())
+ return true;
+
+ if(!file.isSynchronized(IResource.DEPTH_ZERO))
+ return false;
String content = null;
try {
@@ -289,6 +302,7 @@
String newText = "(\""+getNewName()+"\")"; //$NON-NLS-1$ //$NON-NLS-2$
change(file, location.getStartPosition()+location.getLength(), 0, newText);
}
+ return true;
}
@@ -307,34 +321,33 @@
protected void checkDeclarations(ISeamComponent component) throws CoreException{
if(component.getJavaDeclaration() != null){
if(component.getJavaDeclaration().getResource() == null)
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
else if(SeamUtil.isJar(component.getJavaDeclaration()) && component.getJavaDeclaration().getName() != null)
- status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), component.getJavaDeclaration().getResource().getFullPath().toString()}));
+ status.addInfo(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), component.getJavaDeclaration().getResource().getFullPath().toString()}));
}
Set<ISeamXmlComponentDeclaration> xmlDecls = component.getXmlDeclarations();
for(ISeamXmlComponentDeclaration xmlDecl : xmlDecls){
if(xmlDecl.getResource() == null)
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
else if(SeamUtil.isJar(xmlDecl) && xmlDecl.getName() != null)
- status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), xmlDecl.getResource().getFullPath().toString()}));
+ status.addInfo(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), xmlDecl.getResource().getFullPath().toString()}));
}
}
- protected boolean isFileCorrect(IFile file){
- if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isPhantom()){
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
- return false;
- }else if(file.isReadOnly()){
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
- return false;
- }
- return true;
- }
+// protected boolean isFileCorrect(IFile file){
+// if(!file.isSynchronized(IResource.DEPTH_ZERO)){
+// status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
+// return false;
+// }else if(file.isPhantom()){
+// return false;
+// }else if(file.isReadOnly()){
+// status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+// return false;
+// }
+// return true;
+// }
private void renameJavaDeclaration(ISeamJavaComponentDeclaration javaDecl) throws CoreException{
IFile file = (IFile)javaDecl.getResource();
@@ -359,19 +372,6 @@
declarationFile = file;
}
-
- private boolean checkFolder(IResource resource, IResource[] sources, IPath output){
- for(IResource folder : sources){
- if(resource.equals(folder))
- return false;
- }
-
- if(resource.getFullPath().equals(output))
- return false;
-
- return true;
- }
-
protected void renameComponent(IProgressMonitor pm, ISeamComponent component)throws CoreException{
pm.beginTask("", 3);
@@ -442,7 +442,10 @@
}
private void change(IFile file, int offset, int length, String text){
- //System.out.println("change file - "+file.getFullPath()+" offset - "+offset+" len - "+length+" text"+text);
+ if(file.isReadOnly()){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ return;
+ }
String key = file.getFullPath().toString()+" "+offset;
if(!keys.contains(key)){
TextFileChange change = getChange(file);
@@ -472,13 +475,16 @@
}
@Override
- protected boolean isFileCorrect(IFile file) {
- return SeamRenameProcessor.this.isFileCorrect(file);
+ protected void outOfSynch(IProject project) {
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
@Override
protected void match(IFile file, int offset, int length) {
- change(file, offset, length, newName);
+ if(isFileReadOnly(file)){
+ status.addFatalError(NLS.bind(SeamCoreMessages.SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
+ }else
+ change(file, offset, length, newName);
}
protected ELInvocationExpression findComponentReference(ELInvocationExpression invocationExpression){
13 years, 10 months
JBoss Tools SVN: r29350 - branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-02-25 16:30:22 -0500 (Fri, 25 Feb 2011)
New Revision: 29350
Modified:
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties
Log:
JBIDE-8430
Rename "JBoss JSF/SEAM EL Proposals" category to "JBoss JSF EL Proposals"
Issue is fixed. Fixed for 3.2.1
Modified: branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties
===================================================================
--- branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties 2011-02-25 21:28:36 UTC (rev 29349)
+++ branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties 2011-02-25 21:30:22 UTC (rev 29350)
@@ -14,8 +14,8 @@
javaStringELHover= EL in Java String
javaStringELHoverDescription= Shows the Javadoc of the selected EL-operand.
-proposalCategory.xmlEL= JBoss JSF/SEAM EL Proposals
-proposalCategory.xmlTag= JBoss JSF/SEAM Tag Proposals
+proposalCategory.xmlEL= JBoss JSF EL Proposals
+proposalCategory.xmlTag= JBoss JSF Tag Proposals
Toggle.Selection.Bar=Toggle Selection Bar
Externalize.Selected.Property=Externalize Strings...
13 years, 10 months
JBoss Tools SVN: r29349 - trunk/requirements.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-25 16:28:36 -0500 (Fri, 25 Feb 2011)
New Revision: 29349
Added:
trunk/requirements/.gitignore
Log:
.gitignore file
Added: trunk/requirements/.gitignore
===================================================================
--- trunk/requirements/.gitignore (rev 0)
+++ trunk/requirements/.gitignore 2011-02-25 21:28:36 UTC (rev 29349)
@@ -0,0 +1 @@
+download
13 years, 10 months
JBoss Tools SVN: r29348 - in trunk/download.jboss.org/jbosstools/updates: helios and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-25 16:27:38 -0500 (Fri, 25 Feb 2011)
New Revision: 29348
Added:
trunk/download.jboss.org/jbosstools/updates/indigo/
trunk/download.jboss.org/jbosstools/updates/indigo/.gitignore
trunk/download.jboss.org/jbosstools/updates/indigo/README.txt
trunk/download.jboss.org/jbosstools/updates/indigo/compositeArtifacts.xml
trunk/download.jboss.org/jbosstools/updates/indigo/compositeContent.xml
trunk/download.jboss.org/jbosstools/updates/indigo/index.html
trunk/download.jboss.org/jbosstools/updates/requirements/indigo/
trunk/download.jboss.org/jbosstools/updates/requirements/indigo/.gitignore
trunk/download.jboss.org/jbosstools/updates/requirements/indigo/README.txt
Modified:
trunk/download.jboss.org/jbosstools/updates/helios/index.html
Log:
add new composite mirror for Indigo deps
Modified: trunk/download.jboss.org/jbosstools/updates/helios/index.html
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/helios/index.html 2011-02-25 21:15:12 UTC (rev 29347)
+++ trunk/download.jboss.org/jbosstools/updates/helios/index.html 2011-02-25 21:27:38 UTC (rev 29348)
@@ -1,6 +1,6 @@
<html>
<head>
-<title>JBoss Tools Requirements - Composite Mirror</title>
+<title>JBoss Tools Requirements - Composite Mirror - Helios</title>
<style>
@import url("../../web/site.css");
</style>
@@ -18,7 +18,7 @@
<tr>
<td>  </td>
<td>
- <h2 class="title">JBoss Tools Requirements - Composite Mirror</h2>
+ <h2 class="title">JBoss Tools Requirements - Composite Mirror - Helios</h2>
<table width="100%">
<!-- <tr class="light-row" style="height: 30px">
Added: trunk/download.jboss.org/jbosstools/updates/indigo/.gitignore
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/.gitignore (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/.gitignore 2011-02-25 21:27:38 UTC (rev 29348)
@@ -0,0 +1 @@
+*~
Added: trunk/download.jboss.org/jbosstools/updates/indigo/README.txt
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/README.txt (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/README.txt 2011-02-25 21:27:38 UTC (rev 29348)
@@ -0,0 +1,9 @@
+Instead of mirroring Helios here, composite a site here from:
+
+* /updates/requirements/indigo/
+* /updates/requirements/orbit/
+* /updates/requirements/gwt/
+* BIRT 4.0 site @ eclipse.org
+
+See /updates/requirements/indigo/README.txt for how to mirror from eclipse.org to here.
+See /updates/requirements/gwt/build.xml for how to mirror from google.com to here.
Added: trunk/download.jboss.org/jbosstools/updates/indigo/compositeArtifacts.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/compositeArtifacts.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/compositeArtifacts.xml 2011-02-25 21:27:38 UTC (rev 29348)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?compositeArtifactRepository version='1.0.0'?>
+<repository name='JBoss Tools Requirements - Composite Mirror' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
+<properties size='2'>
+<property name='p2.compressed' value='true'/>
+<!--
+ get new time w/
+ date +%s000
+-->
+<property name='p2.timestamp' value='1298611290000'/>
+</properties>
+<children size='4'>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/indigo/'/>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/orbit/S20100831...'/>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/gwt/201012211742/'/>
+<child location='http://download.eclipse.org//birt/update-site/4.0-interim/'/>
+</children>
+</repository>
Added: trunk/download.jboss.org/jbosstools/updates/indigo/compositeContent.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/compositeContent.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/compositeContent.xml 2011-02-25 21:27:38 UTC (rev 29348)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?compositeMetadataRepository version='1.0.0'?>
+<repository name='JBoss Tools Requirements - Composite Mirror' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
+<properties size='2'>
+<property name='p2.compressed' value='true'/>
+<!--
+ get new time w/
+ date +%s000
+-->
+<property name='p2.timestamp' value='1298611290000'/>
+</properties>
+<children size='4'>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/indigo/'/>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/orbit/S20100831...'/>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/gwt/201012211742/'/>
+<child location='http://download.eclipse.org//birt/update-site/4.0-interim/'/>
+</children>
+</repository>
Copied: trunk/download.jboss.org/jbosstools/updates/indigo/index.html (from rev 29347, trunk/download.jboss.org/jbosstools/updates/helios/index.html)
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/index.html (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/index.html 2011-02-25 21:27:38 UTC (rev 29348)
@@ -0,0 +1,140 @@
+<html>
+<head>
+<title>JBoss Tools Requirements - Composite Mirror - Indigo</title>
+<style>
+@import url("../../web/site.css");
+</style>
+</head>
+<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
+<table marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"
+ cellspacing="0" cellpadding="0">
+ <tr>
+ <td colspan="2"><img
+ src="https://www.jboss.org/dms/tools/images/tools-banner.png" /></td>
+ </tr>
+ <tr>
+ <td>  </td>
+ </tr>
+ <tr>
+ <td>  </td>
+ <td>
+ <h2 class="title">JBoss Tools Requirements - Composite Mirror - Indigo</h2>
+ <table width="100%">
+
+ <!-- <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <p class="bodyText"></p>
+ </td>
+ </tr> -->
+
+ <tr class="dark-row" style="height: 30px">
+ <td class="bodyText">
+ <!-- <p class="bodyText"></p> -->
+
+<!-- to convert raw fish listing to links do this in vi
+
+:%s#^sftp://jbossqa@filemgmt.jboss.org/htdocs/jbosstools/updates/\(.\+\)$#<li><a class=link href=\1>\1<\/a></li>#g
+
+Then sftp file into
+
+jbossqa(a)filemgmt.jboss.org/htdocs/jbosstools/updates/
+
+which becomes
+
+http://download.jboss.org/jbosstools/updates/
+
+-->
+ <br/>
+ <ul>
+<li><a class=link href=README.txt>README.txt</a></li>
+<li><a class=link href=compositeArtifacts.xml>compositeArtifacts.xml</a></li>
+<li><a class=link href=compositeContent.xml>compositeContent.xml</a></li>
+ </ul>
+ <br/>
+ </td>
+ </tr>
+
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <p class="bodyText">You can also download JBoss Tools as
+ individual zips for offline installation. See <a class="link"
+ href="http://www.jboss.org/tools/download">JBoss Tools
+ Downloads</a>.</p>
+ </td>
+ </tr>
+
+ <tr class="dark-row" style="height: 30px">
+ <td class="bodyText">
+ <p class="bodyText">For more information, see <a
+ href="http://www.jboss.org/tools/download/installation">Installation
+ methods</a>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td class="spacer"><br />
+ </td>
+ <td class="spacer"><br />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <table width="100%">
+ <tr class="header">
+ <td class="sub-header" width="100%"><span> Installation
+ Types</span></td>
+ </tr>
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <p class="bodyText">Depending on how close to the bleeding edge
+ you like to be, there are several types of releases available.</p>
+ <br />
+
+ </td>
+ </tr>
+
+ <tr class="dark-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Stable Releases</h4>
+
+ <p><a href="https://www.jboss.org/tools/download/stable.html">Stable
+ releases</a> are - as indicated by their name - stable.</p><br/>
+
+ </td>
+ </tr>
+
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Development Milestones</h4>
+
+ <p><a href="https://www.jboss.org/tools/download/dev.html">Development
+ builds</a>, released once per milestone and only a few times a year, are
+ fairly stable, but there may be some things which do not yet work.
+ If you would like to try one of these milestones, we'd greatly
+ appreciate the assistance in testing and <a
+ href="https://jira.jboss.org/jira/browse/JBIDE">reporting of
+ issues in our issue tracker</a>.</p><br/>
+
+ </td>
+ </tr>
+
+ <tr class="dark-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Nightly Builds</h4>
+
+ <p>The <a
+ href="https://www.jboss.org/tools/download/nightly.html">bleeding
+ edge</a> contains the latest and greatest new features, but nothing is
+ stable or guaranteed - yet. If you're using a Milestone and need a
+ fix, you can update to the latest Nightly, or wait for the next
+ Milestone.</p><br/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</html>
Added: trunk/download.jboss.org/jbosstools/updates/requirements/indigo/.gitignore
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/indigo/.gitignore (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/indigo/.gitignore 2011-02-25 21:27:38 UTC (rev 29348)
@@ -0,0 +1 @@
+*~
Added: trunk/download.jboss.org/jbosstools/updates/requirements/indigo/README.txt
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/indigo/README.txt (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/indigo/README.txt 2011-02-25 21:27:38 UTC (rev 29348)
@@ -0,0 +1,14 @@
+To rsync a mirror from eclipse.org to here, do the following:
+
+1. ssh to qa01, then sudo to hudson:
+
+$ ssh nboldt(a)qa01.qa.atl2.redhat.com
+$ sudo su - hudson
+
+2. rsync build.eclipse.org to reports.qa:
+
+$ rsync -aP --delete nickb@build.eclipse.org:~/downloads/releases/indigo/* /qa/services/http/binaries/RHDS/updates/requirements/indigo/
+
+3. rsync reports.qa to download.jboss.org:
+
+$ rsync -aP --delete /qa/services/http/binaries/RHDS/updates/requirements/indigo/* tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/requirements/indigo/
13 years, 10 months
JBoss Tools SVN: r29347 - trunk/jst/plugins/org.jboss.tools.jst.jsp.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-02-25 16:15:12 -0500 (Fri, 25 Feb 2011)
New Revision: 29347
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties
Log:
JBIDE-8430
Rename "JBoss JSF/SEAM EL Proposals" category to "JBoss JSF EL Proposals"
Issue is fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties 2011-02-25 20:59:11 UTC (rev 29346)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties 2011-02-25 21:15:12 UTC (rev 29347)
@@ -14,10 +14,9 @@
javaStringELHover= EL in Java String
javaStringELHoverDescription= Shows the Javadoc of the selected EL-operand.
-proposalCategory.xmlEL= JBoss JSF/SEAM EL Proposals
-proposalCategory.xmlTag= JBoss JSF/SEAM Tag Proposals
+proposalCategory.xmlEL= JBoss JSF EL Proposals
+proposalCategory.xmlTag= JBoss JSF Tag Proposals
Toggle.Selection.Bar=Toggle Selection Bar
Externalize.Selected.Property=Externalize Strings...
vpe.toolbar.name=VPE Toolbar
-
13 years, 10 months
JBoss Tools SVN: r29346 - in trunk/forge/plugins/org.jboss.tools.seam.forge: src/org/jboss/tools/seam/forge and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-02-25 15:59:11 -0500 (Fri, 25 Feb 2011)
New Revision: 29346
Added:
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/preferences/
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/preferences/EmptyPreferencePage.java
Modified:
trunk/forge/plugins/org.jboss.tools.seam.forge/plugin.xml
Log:
initial work for runtime preferences page
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/plugin.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/plugin.xml 2011-02-25 20:46:04 UTC (rev 29345)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/plugin.xml 2011-02-25 20:59:11 UTC (rev 29346)
@@ -44,5 +44,18 @@
</action>
</viewContribution>
</extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ name="Forge"
+ class="org.jboss.tools.seam.forge.preferences.EmptyPreferencePage"
+ id="org.jboss.tools.seam.forge">
+ </page>
+ <page
+ name="Installed Forge Runtimes"
+ category="org.jboss.tools.seam.forge"
+ class="org.jboss.tools.seam.forge.preferences.EmptyPreferencePage"
+ id="org.jboss.tools.seam.forge.runtimes">
+ </page>
+ </extension>
</plugin>
Added: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/preferences/EmptyPreferencePage.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/preferences/EmptyPreferencePage.java (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/preferences/EmptyPreferencePage.java 2011-02-25 20:59:11 UTC (rev 29346)
@@ -0,0 +1,25 @@
+package org.jboss.tools.seam.forge.preferences;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class EmptyPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ public EmptyPreferencePage() {
+ super();
+ setDescription("Expand the tree to edit preferences for a specific feature.");
+ }
+
+ protected Control createContents(Composite parent) {
+ noDefaultAndApplyButton();
+ return new Composite(parent, SWT.NULL);
+ }
+
+ public void init(IWorkbench workbench) {
+ }
+
+}
Property changes on: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/preferences/EmptyPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 10 months
JBoss Tools SVN: r29345 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-25 15:46:04 -0500 (Fri, 25 Feb 2011)
New Revision: 29345
Modified:
trunk/build/parent/pom.xml
Log:
switch from 3.6.x to 3.6, as 3.6.2 is now out
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2011-02-25 17:18:48 UTC (rev 29344)
+++ trunk/build/parent/pom.xml 2011-02-25 20:46:04 UTC (rev 29345)
@@ -431,7 +431,7 @@
</repository>
<repository>
<id>eclipse36</id>
- <url>http://download.eclipse.org/eclipse/updates/3.6.x/
+ <url>http://download.eclipse.org/eclipse/updates/3.6/
</url>
<layout>p2</layout>
<snapshots>
13 years, 10 months