JBoss Tools SVN: r42517 - in trunk: common/plugins/org.jboss.tools.common/META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-07-11 16:41:24 -0400 (Wed, 11 Jul 2012)
New Revision: 42517
Added:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseJavaFileChange.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/FileChangeFactory.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
trunk/common/plugins/org.jboss.tools.common/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java
trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java
Log:
Quick fix 'Delete annotations...' breaks quick fix hover https://issues.jboss.org/browse/JBIDE-12311
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -21,13 +21,14 @@
import org.eclipse.ltk.core.refactoring.Change;
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.CheckConditionsContext;
import org.eclipse.text.edits.MultiTextEdit;
import org.jboss.tools.cdi.core.CDICoreMessages;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.common.EclipseUtil;
-import org.jboss.tools.common.refactoring.BaseFileChange;
+import org.jboss.tools.common.refactoring.FileChangeFactory;
public class AddQualifiersToBeanProcessor extends CDIRefactoringProcessor {
protected IBean selectedBean;
@@ -90,7 +91,7 @@
ICompilationUnit compilationUnit = original.getWorkingCopy(pm);
- BaseFileChange fileChange = new BaseFileChange(file);
+ TextFileChange fileChange = FileChangeFactory.getFileChange(file);
MultiTextEdit edit = new MultiTextEdit();
@@ -106,7 +107,7 @@
fileChange.setEdit(edit);
rootChange.add(fileChange);
}
- fileChange = new BaseFileChange(file2);
+ fileChange = FileChangeFactory.getFileChange(file2);
edit = new MultiTextEdit();
}else{
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -18,6 +18,7 @@
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.text.edits.MultiTextEdit;
import org.jboss.tools.cdi.core.CDICoreMessages;
import org.jboss.tools.cdi.core.CDICoreNature;
@@ -25,12 +26,12 @@
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
-import org.jboss.tools.common.refactoring.BaseFileChange;
+import org.jboss.tools.common.refactoring.FileChangeFactory;
public abstract class CDIRefactoringProcessor extends AbstractCDIProcessor {
protected IFile file;
- protected BaseFileChange change;
+ protected TextFileChange change;
protected IClassBean bean;
public CDIRefactoringProcessor(IFile file, String label){
@@ -44,7 +45,7 @@
protected void createRootChange(){
rootChange = new CompositeChange(getLabel());
- change = new BaseFileChange(file);
+ change = FileChangeFactory.getFileChange(file);
MultiTextEdit root = new MultiTextEdit();
change.setEdit(root);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -19,6 +19,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
@@ -28,14 +29,14 @@
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
-import org.jboss.tools.common.refactoring.BaseFileChange;
+import org.jboss.tools.common.refactoring.FileChangeFactory;
import org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher;
/**
* @author Daniel Azarov
*/
public abstract class CDIRenameProcessor extends AbstractCDIProcessor {
- protected BaseFileChange lastChange;
+ protected TextFileChange lastChange;
protected IFile declarationFile=null;
private String newName;
@@ -84,18 +85,18 @@
}
// lets collect all changes for the same files in one MultiTextEdit
- protected BaseFileChange getChange(IFile file){
+ protected TextFileChange getChange(IFile file){
if(lastChange != null && lastChange.getFile().equals(file))
return lastChange;
for(int i=0; i < rootChange.getChildren().length; i++){
- BaseFileChange change = (BaseFileChange)rootChange.getChildren()[i];
+ TextFileChange change = (TextFileChange)rootChange.getChildren()[i];
if(change.getFile().equals(file)){
lastChange = change;
return lastChange;
}
}
- lastChange = new BaseFileChange(file);
+ lastChange = FileChangeFactory.getFileChange(file);
MultiTextEdit root = new MultiTextEdit();
lastChange.setEdit(root);
@@ -115,7 +116,7 @@
protected void change(IFile file, int offset, int length, String text){
String key = file.getFullPath().toString()+" "+offset;
if(!keys.contains(key)){
- BaseFileChange change = getChange(file);
+ TextFileChange change = getChange(file);
TextEdit edit = new ReplaceEdit(offset, length, text);
change.addEdit(edit);
keys.add(key);
Modified: trunk/common/plugins/org.jboss.tools.common/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/META-INF/MANIFEST.MF 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/common/plugins/org.jboss.tools.common/META-INF/MANIFEST.MF 2012-07-11 20:41:24 UTC (rev 42517)
@@ -42,7 +42,8 @@
org.eclipse.ui.editors;bundle-version="3.7.0",
org.eclipse.jpt.common.core;bundle-version="1.0.0",
org.eclipse.ltk.core.refactoring;bundle-version="3.5.200",
- org.eclipse.wst.sse.ui;bundle-version="1.3.100"
+ org.eclipse.wst.sse.ui;bundle-version="1.3.100",
+ org.eclipse.jdt.core.manipulation;bundle-version="1.5.0"
Bundle-Version: 3.4.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-ManifestVersion: 2
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -11,27 +11,11 @@
package org.jboss.tools.common.refactoring;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.ContentStamp;
import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.UndoTextFileChange;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.UndoEdit;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.UIJob;
import org.jboss.tools.common.CommonPlugin;
@@ -47,7 +31,7 @@
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
try {
- if(isOpenInEditor(getFile())){
+ if(FileChangeFactory.isOpenInEditor(getFile())){
setSaveMode(TextFileChange.LEAVE_DIRTY);
}else{
setSaveMode(TextFileChange.FORCE_SAVE);
@@ -61,55 +45,4 @@
job.setSystem(true);
job.schedule();
}
-
- private static boolean isOpenInEditor(IFile file) throws PartInitException{
- IEditorInput input = EditorUtility.getEditorInput(file);
- for(IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()){
- for(IWorkbenchPage page : window.getPages()){
- for(IEditorReference editorReference : page.getEditorReferences()){
- IEditorPart editor = editorReference.getEditor(true);
- if(editor != null && editor.getEditorInput().equals(input)){
- return true;
- }
- }
- }
- }
- return false;
- }
-
- @Override
- protected void releaseDocument(IDocument document, IProgressMonitor pm)
- throws CoreException {
- super.releaseDocument(document, pm);
- try {
- getFile().touch(new NullProgressMonitor());
- } catch (CoreException e) {
- // do nothing
- }
- }
-
- @Override
- protected Change createUndoChange(UndoEdit edit, ContentStamp stampToRestore) {
- return new UndoBaseFileChange(getName(), getFile(), edit, stampToRestore, getSaveMode());
- }
-
- class UndoBaseFileChange extends UndoTextFileChange{
-
- protected UndoBaseFileChange(String name, IFile file, UndoEdit undo,
- ContentStamp stamp, int saveMode) {
- super(name, file, undo, stamp, saveMode);
- }
-
- @Override
- public Change perform(IProgressMonitor pm) throws CoreException {
- Change change = super.perform(pm);
- try {
- getFile().touch(new NullProgressMonitor());
- } catch (CoreException e) {
- // do nothing
- }
- return change;
- }
-
- }
}
Added: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseJavaFileChange.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseJavaFileChange.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseJavaFileChange.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.refactoring;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.progress.UIJob;
+import org.jboss.tools.common.CommonPlugin;
+
+public class BaseJavaFileChange extends CompilationUnitChange {
+
+ public BaseJavaFileChange(String name, ICompilationUnit cunit) {
+ super(name, cunit);
+ setSaveMode();
+ }
+
+ private void setSaveMode(){
+ UIJob job = new UIJob("setSaveMode"){ //$NON-NLS-1$
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ try {
+ if(FileChangeFactory.isOpenInEditor(getFile())){
+ setSaveMode(TextFileChange.LEAVE_DIRTY);
+ }else{
+ setSaveMode(TextFileChange.FORCE_SAVE);
+ }
+ } catch (PartInitException e) {
+ CommonPlugin.getDefault().logError(e);
+ }
+ return Status.OK_STATUS;
+ }};
+
+ job.setSystem(true);
+ job.schedule();
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseJavaFileChange.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/FileChangeFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/FileChangeFactory.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/FileChangeFactory.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.refactoring;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.EclipseUtil;
+
+public class FileChangeFactory {
+ public static TextFileChange getFileChange(IFile file){
+ ICompilationUnit compilationUnit = EclipseUtil.getCompilationUnit(file);
+
+ if(compilationUnit != null){
+ return new BaseJavaFileChange("", compilationUnit);
+ }else{
+ return new BaseFileChange(file);
+ }
+ }
+
+ public static boolean isOpenInEditor(IFile file) throws PartInitException{
+ IEditorInput input = EditorUtility.getEditorInput(file);
+ for(IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()){
+ for(IWorkbenchPage page : window.getPages()){
+ for(IEditorReference editorReference : page.getEditorReferences()){
+ IEditorPart editor = editorReference.getEditor(true);
+ if(editor != null && editor.getEditorInput().equals(input)){
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/FileChangeFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -43,6 +43,7 @@
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.TextChange;
import org.eclipse.ltk.core.refactoring.TextEditBasedChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.text.edits.DeleteEdit;
import org.eclipse.text.edits.InsertEdit;
import org.eclipse.text.edits.MultiTextEdit;
@@ -703,8 +704,8 @@
}
private static TextEdit getEdit(Change change) throws CoreException{
- if(change instanceof BaseFileChange){
- return ((BaseFileChange) change).getEdit();
+ if(change instanceof TextFileChange){
+ return ((TextFileChange) change).getEdit();
}else if(change instanceof TextChange){
return ((TextChange) change).getEdit();
}else if(change instanceof CompositeChange){
Modified: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -34,7 +34,6 @@
import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
import org.eclipse.text.edits.MultiTextEdit;
-import org.jboss.tools.common.refactoring.BaseFileChange;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.test.util.JobUtils;
@@ -179,9 +178,9 @@
MultiTextEdit edit = null;
IFile file = null;
- if(fileChange instanceof BaseFileChange){
- edit = (MultiTextEdit)((BaseFileChange)fileChange).getEdit();
- file = ((BaseFileChange)fileChange).getFile();
+ if(fileChange instanceof TextFileChange){
+ edit = (MultiTextEdit)((TextFileChange)fileChange).getEdit();
+ file = ((TextFileChange)fileChange).getFile();
//((JBDSFileChange)fileChange).setSaveMode(TextFileChange.FORCE_SAVE);
}else if(fileChange instanceof TextFileChange){
edit = (MultiTextEdit)((TextFileChange)fileChange).getEdit();
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 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -23,6 +23,7 @@
import org.eclipse.ltk.core.refactoring.Change;
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.CheckConditionsContext;
import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
@@ -31,7 +32,7 @@
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
-import org.jboss.tools.common.refactoring.BaseFileChange;
+import org.jboss.tools.common.refactoring.FileChangeFactory;
import org.jboss.tools.common.util.BeanUtil;
import org.jboss.tools.jsf.ui.JsfUIMessages;
import org.jboss.tools.jst.web.kb.refactoring.ELProjectSetExtension;
@@ -45,7 +46,7 @@
private RenameMethodSearcher searcher;
private RefactoringStatus status;
private CompositeChange rootChange;
- private BaseFileChange lastChange;
+ private TextFileChange lastChange;
private ArrayList<String> keys = new ArrayList<String>();
private ArrayList<Object> otherElements = new ArrayList<Object>();
@@ -136,18 +137,18 @@
return false;
}
- protected BaseFileChange getChange(IFile file){
+ protected TextFileChange getChange(IFile file){
if(lastChange != null && lastChange.getFile().equals(file))
return lastChange;
for(int i=0; i < rootChange.getChildren().length; i++){
- BaseFileChange change = (BaseFileChange)rootChange.getChildren()[i];
+ TextFileChange change = (TextFileChange)rootChange.getChildren()[i];
if(change.getFile().equals(file)){
lastChange = change;
return lastChange;
}
}
- lastChange = new BaseFileChange(file);
+ lastChange = FileChangeFactory.getFileChange(file);
MultiTextEdit root = new MultiTextEdit();
lastChange.setEdit(root);
rootChange.add(lastChange);
@@ -158,7 +159,7 @@
private void change(IFile file, int offset, int length, String text){
String key = file.getFullPath().toString()+" "+offset;
if(!keys.contains(key)){
- BaseFileChange change = getChange(file);
+ TextFileChange change = getChange(file);
TextEdit edit = new ReplaceEdit(offset, length, text);
change.addEdit(edit);
keys.add(key);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java 2012-07-11 20:32:17 UTC (rev 42516)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java 2012-07-11 20:41:24 UTC (rev 42517)
@@ -12,8 +12,8 @@
import org.eclipse.jdt.core.IMethod;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.text.edits.MultiTextEdit;
-import org.jboss.tools.common.refactoring.BaseFileChange;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.jsf.ui.el.refactoring.RenameMethodParticipant;
import org.jboss.tools.test.util.JobUtils;
@@ -61,7 +61,7 @@
assertEquals("There is unexpected number of changes",changeList.size(), rootChange.getChildren().length);
for(int i = 0; i < rootChange.getChildren().length;i++){
- BaseFileChange fileChange = (BaseFileChange)rootChange.getChildren()[i];
+ TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
IFile file = fileChange.getFile();
IMarker[] markers = file.findMarkers(null, true, IResource.DEPTH_INFINITE);
numberOfMarkers[i] = markers.length;
13 years, 9 months
JBoss Tools SVN: r42516 - in trunk: central/plugins/org.jboss.tools.central.discovery and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-07-11 16:32:17 -0400 (Wed, 11 Jul 2012)
New Revision: 42516
Modified:
trunk/build/aggregate/site/site.xml
trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF
Log:
re-enable GWT - bump up to version 3.0.1 as that's the first one available for Juno (e42) - JBIDE-11549, JBIDE-12287, JBDS-2235, JBDS-2237
Modified: trunk/build/aggregate/site/site.xml
===================================================================
--- trunk/build/aggregate/site/site.xml 2012-07-11 20:08:01 UTC (rev 42515)
+++ trunk/build/aggregate/site/site.xml 2012-07-11 20:32:17 UTC (rev 42516)
@@ -203,17 +203,13 @@
<category name="AbridgedTools" />
<category name="MavenTools" />
</feature>
- <!-- JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
<feature url="features/org.jboss.tools.maven.gwt.feature_0.0.0.jar" id="org.jboss.tools.maven.gwt.feature" version="0.0.0">
<category name="MavenTools" />
</feature>
- -->
<!-- only in JBT -->
- <!-- JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
<feature url="features/org.jboss.tools.gwt.feature_0.0.0.jar" id="org.jboss.tools.gwt.feature" version="0.0.0">
<category name="GeneralTools" />
</feature>
- -->
<feature url="features/org.jboss.tools.common.mylyn.feature_0.0.0.jar" id="org.jboss.tools.common.mylyn.feature" version="0.0.0">
<category name="AbridgedTools" />
<category name="GeneralTools"/>
@@ -394,17 +390,13 @@
<feature url="features/org.jboss.tools.maven.jbosspackaging.feature.source_0.0.0.jar" id="org.jboss.tools.maven.jbosspackaging.feature.source" version="0.0.0">
<category name="AllSources" />
</feature>
- <!-- JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
<feature url="features/org.jboss.tools.maven.gwt.feature.source_0.0.0.jar" id="org.jboss.tools.maven.gwt.feature.source" version="0.0.0">
<category name="AllSources" />
</feature>
- -->
<!-- only in JBT -->
- <!-- JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
<feature url="features/org.jboss.tools.gwt.feature.source_0.0.0.jar" id="org.jboss.tools.gwt.feature.source" version="0.0.0">
<category name="AllSources" />
</feature>
- -->
<feature url="features/org.jboss.tools.common.mylyn.feature.source_0.0.0.jar" id="org.jboss.tools.common.mylyn.feature.source" version="0.0.0">
<category name="AllSources"/>
</feature>
Modified: trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-07-11 20:08:01 UTC (rev 42515)
+++ trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-07-11 20:32:17 UTC (rev 42516)
@@ -61,7 +61,7 @@
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/juno/central/core/">
<iu id="org.jboss.tools.maven.gwt.feature"/>
- <iu id="com.google.gdt.eclipse.suite.e37.feature"/>
+ <iu id="com.google.gdt.eclipse.suite.e42.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -555,14 +555,14 @@
categoryId="org.jboss.tools.central.discovery.web"
groupId="org.jboss.tools.central.discovery.web.extras"
description="Google Plugin for Eclipse (GPE) + Google Web Toolkit SDK (GWT)"
- id="com.google.gwt.eclipse.sdkbundle.e37.feature"
+ id="com.google.gwt.eclipse.sdkbundle.e42.feature"
kind="task"
license="EPL, Other"
name="Google Plugin + Web Toolkit"
provider="Google, Inc."
siteUrl="http://download.jboss.org/jbosstools/updates/development/juno/central/core/">
- <iu id="com.google.gwt.eclipse.sdkbundle.e37.feature"/>
- <iu id="com.google.gdt.eclipse.suite.e37.feature"/>
+ <iu id="com.google.gwt.eclipse.sdkbundle.e42.feature"/>
+ <iu id="com.google.gdt.eclipse.suite.e42.feature"/>
<icon
image32="images/google_32.png">
</icon>
Modified: trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF 2012-07-11 20:08:01 UTC (rev 42515)
+++ trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF 2012-07-11 20:32:17 UTC (rev 42516)
@@ -8,8 +8,8 @@
Require-Bundle:
org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
com.google.gwt.eclipse.core,
- com.google.gwt.eclipse.sdkbundle;bundle-version="[2.3.0,3.0.0)",
- com.google.gdt.eclipse.suite;bundle-version="2.5.0",
+ com.google.gwt.eclipse.sdkbundle;bundle-version="[2.4.0,3.0.0)",
+ com.google.gdt.eclipse.suite;bundle-version="3.0.1",
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.wst.common.project.facet.core;bundle-version="[1.4.0,2.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
13 years, 9 months
JBoss Tools SVN: r42515 - trunk/download.jboss.org/jbosstools/updates/juno/SR0.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-07-11 16:08:01 -0400 (Wed, 11 Jul 2012)
New Revision: 42515
Modified:
trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeArtifacts.xml
trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeContent.xml
Log:
link to GWT 3.0.1 for Eclipse 4.2 - JBIDE-11469, JBIDE-12287
Modified: trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeArtifacts.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeArtifacts.xml 2012-07-11 20:07:51 UTC (rev 42514)
+++ trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeArtifacts.xml 2012-07-11 20:08:01 UTC (rev 42515)
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<?compositeArtifactRepository version='1.0.0'?>
-<repository name='JBoss Tools Requirements - Composite Juno M6 Mirror' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
+<repository name='JBoss Tools Requirements - Composite Juno SR0 Mirror' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1340820659000'/>
+<property name='p2.timestamp' value='1342036537000'/>
</properties>
<children size='11'>
<!-- new for Juno -->
@@ -17,7 +17,7 @@
<!-- removed emf to see if it's still needed or if it's sufficient to include juno -->
<!-- removed mylyn as all its features are included in juno; create new atlassian bucket instead -->
-<child location='../../requirements/gwt/2.5.2.v201202290255-rel-r37/'/>
+<child location='../../requirements/gwt/3.0.1.v201206290132-rel-r42/'/>
<!-- includes m2e, m2e-extras, m2e-wtp, m2e-jdt-compiler -->
<child location='../../requirements/m2eclipse/20120627-1400/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeContent.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeContent.xml 2012-07-11 20:07:51 UTC (rev 42514)
+++ trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeContent.xml 2012-07-11 20:08:01 UTC (rev 42515)
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
-<repository name='JBoss Tools Requirements - Composite Juno M6 Mirror' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
+<repository name='JBoss Tools Requirements - Composite Juno SR0 Mirror' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1340820655000'/>
+<property name='p2.timestamp' value='1342036556000'/>
</properties>
<children size='11'>
<!-- new for Juno -->
@@ -17,7 +17,7 @@
<!-- removed emf to see if it's still needed or if it's sufficient to include juno -->
<!-- removed mylyn as all its features are included in juno; create new atlassian bucket instead -->
-<child location='../../requirements/gwt/2.5.2.v201202290255-rel-r37/'/>
+<child location='../../requirements/gwt/3.0.1.v201206290132-rel-r42/'/>
<!-- includes m2e, m2e-extras, m2e-wtp, m2e-jdt-compiler -->
<child location='../../requirements/m2eclipse/20120627-1400/'/>
13 years, 9 months
JBoss Tools SVN: r42514 - trunk/download.jboss.org/jbosstools/updates/requirements/gwt.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-07-11 16:07:51 -0400 (Wed, 11 Jul 2012)
New Revision: 42514
Added:
trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build-3.0.1....
trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build-3.0.1....
Modified:
trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml
Log:
add builders for GWT 3.0.1 for Eclipse 3.7 and 4.2 (separate sites) - JBIDE-11469, JBIDE-12287
Copied: trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build-3.0.1.... (from rev 42513, trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml)
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build-3.0.1.... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build-3.0.1.... 2012-07-11 20:07:51 UTC (rev 42514)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="mirror">
+ <!-- run locally in Eclipse (to resolve p2 tasks) using these commandline options:
+
+ -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
+ -consoleLog -nosplash -data /tmp
+ -application org.eclipse.ant.core.antRunner
+ -f "/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml"
+
+ or, run headless on qa01 server, where Eclipse is installed into ~/eclipse:
+
+ export JAVA_HOME=/opt/jdk1.6.0; \
+ ${JAVA_HOME}/bin/java -cp ~/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
+ org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
+ -application org.eclipse.ant.core.antRunner \
+ -f ~/RHDS/updates/requirements/gwt/build.xml -Ddestination=/tmp/gwt-repo
+ -->
+ <target name="mirror">
+ <property name="URL" value="http://dl.google.com/eclipse/plugin/3.7" />
+ <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/gwt/" />
+ <property name="compress" value="true" />
+
+ <p2.mirror>
+ <repository location="file:${destination}/3.0.1.v201206290132-rel-r37" name="Google Plugin for Eclipse 3.7" />
+ <source>
+ <repository location="${URL}" />
+ </source>
+ <!-- JBDS-1737: GPE and GWT SDK -->
+ <iu id="com.google.gdt.eclipse.suite.e37.feature.feature.group"/>
+ <iu id="com.google.gwt.eclipse.sdkbundle.e37.feature.feature.group"/>
+
+ <!-- JBIDE-11167: Windowbuilder and GDT Designer -->
+ <iu id="com.google.gdt.eclipse.designer.hosted.feature.feature.group"/>
+ <iu id="com.google.gdt.eclipse.designer.editor.feature.feature.group"/>
+ <iu id="com.google.gdt.eclipse.designer.gpe.feature.feature.group"/>
+ <iu id="org.eclipse.wb.core.feature.feature.group"/>
+ <iu id="org.eclipse.wb.css.feature.feature.group"/>
+ <iu id="org.eclipse.wb.core.xml.feature.feature.group"/>
+
+ <slicingOptions includeFeatures="true" followStrict="true" />
+ </p2.mirror>
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/3.0.1.v201206290132-rel-r37" artifactRepository="file:${destination}/3.0.1.v201206290132-rel-r37" publishartifacts="true" source="${destination}/3.0.1.v201206290132-rel-r37" compress="${compress}" />
+ </target>
+</project>
Copied: trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build-3.0.1.... (from rev 42513, trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml)
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build-3.0.1.... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build-3.0.1.... 2012-07-11 20:07:51 UTC (rev 42514)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="mirror">
+ <!-- run locally in Eclipse (to resolve p2 tasks) using these commandline options:
+
+ -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
+ -consoleLog -nosplash -data /tmp
+ -application org.eclipse.ant.core.antRunner
+ -f "/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml"
+
+ or, run headless on qa01 server, where Eclipse is installed into ~/eclipse:
+
+ export JAVA_HOME=/opt/jdk1.6.0; \
+ ${JAVA_HOME}/bin/java -cp ~/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
+ org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
+ -application org.eclipse.ant.core.antRunner \
+ -f ~/RHDS/updates/requirements/gwt/build.xml -Ddestination=/tmp/gwt-repo
+ -->
+ <target name="mirror">
+ <property name="URL" value="http://dl.google.com/eclipse/plugin/4.2/"/>
+ <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/gwt/" />
+ <property name="compress" value="true" />
+
+ <p2.mirror>
+ <repository location="file:${destination}/3.0.1.v201206290132-rel-r42" name="Google Plugin for Eclipse 4.2" />
+ <source>
+ <repository location="${URL}" />
+ </source>
+ <!-- JBDS-1737: GPE and GWT SDK -->
+ <iu id="com.google.gdt.eclipse.suite.e42.feature.feature.group"/>
+ <iu id="com.google.gwt.eclipse.sdkbundle.e42.feature.feature.group"/>
+
+ <!-- JBIDE-11167: Windowbuilder and GDT Designer -->
+ <iu id="com.google.gdt.eclipse.designer.hosted.feature.feature.group"/>
+ <iu id="com.google.gdt.eclipse.designer.editor.feature.feature.group"/>
+ <iu id="com.google.gdt.eclipse.designer.gpe.feature.feature.group"/>
+ <iu id="org.eclipse.wb.core.feature.feature.group"/>
+ <iu id="org.eclipse.wb.css.feature.feature.group"/>
+ <iu id="org.eclipse.wb.core.xml.feature.feature.group"/>
+
+ <slicingOptions includeFeatures="true" followStrict="true" />
+ </p2.mirror>
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/3.0.1.v201206290132-rel-r42" artifactRepository="file:${destination}/3.0.1.v201206290132-rel-r42" publishartifacts="true" source="${destination}/3.0.1.v201206290132-rel-r42" compress="${compress}" />
+ </target>
+</project>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml 2012-07-11 18:46:59 UTC (rev 42513)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml 2012-07-11 20:07:51 UTC (rev 42514)
@@ -16,18 +16,18 @@
-f ~/RHDS/updates/requirements/gwt/build.xml -Ddestination=/tmp/gwt-repo
-->
<target name="mirror">
- <property name="URL" value="http://dl.google.com/eclipse/plugin/3.7" />
+ <property name="URL" value="http://dl.google.com/eclipse/plugin/4.2/"/>
<property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/gwt/" />
<property name="compress" value="true" />
<p2.mirror>
- <repository location="file:${destination}/2.6.1.v201205091048-rel-r37" name="Google Plugin for Eclipse 3.7" />
+ <repository location="file:${destination}/3.0.1.v201206290132-rel-r42" name="Google Plugin for Eclipse 4.2" />
<source>
<repository location="${URL}" />
</source>
<!-- JBDS-1737: GPE and GWT SDK -->
- <iu id="com.google.gdt.eclipse.suite.e37.feature.feature.group"/>
- <iu id="com.google.gwt.eclipse.sdkbundle.e37.feature.feature.group"/>
+ <iu id="com.google.gdt.eclipse.suite.e42.feature.feature.group"/>
+ <iu id="com.google.gwt.eclipse.sdkbundle.e42.feature.feature.group"/>
<!-- JBIDE-11167: Windowbuilder and GDT Designer -->
<iu id="com.google.gdt.eclipse.designer.hosted.feature.feature.group"/>
@@ -39,6 +39,6 @@
<slicingOptions includeFeatures="true" followStrict="true" />
</p2.mirror>
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/2.6.1.v201205091048-rel-r37" artifactRepository="file:${destination}/2.6.1.v201205091048-rel-r37" publishartifacts="true" source="${destination}/2.6.1.v201205091048-rel-r37" compress="${compress}" />
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/3.0.1.v201206290132-rel-r42" artifactRepository="file:${destination}/3.0.1.v201206290132-rel-r42" publishartifacts="true" source="${destination}/3.0.1.v201206290132-rel-r42" compress="${compress}" />
</target>
</project>
13 years, 9 months
JBoss Tools SVN: r42513 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-07-11 14:46:59 -0400 (Wed, 11 Jul 2012)
New Revision: 42513
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFELCompletionEngine.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFFuncsELCompletionEngine.java
Log:
https://issues.jboss.org/browse/JBIDE-12317 EL Validation warnings for functions
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFELCompletionEngine.java 2012-07-11 18:20:55 UTC (rev 42512)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFELCompletionEngine.java 2012-07-11 18:46:59 UTC (rev 42513)
@@ -91,7 +91,7 @@
* @param onlyEqualNames
* @return
*/
- public List<IJSFVariable> resolveVariables(IFile file, ELContext context, IModelNature project, ELInvocationExpression expr, boolean isFinal, boolean onlyEqualNames, int offset) {
+ private List<IJSFVariable> resolveVariables(IFile file, ELContext context, IModelNature project, ELInvocationExpression expr, boolean isFinal, boolean onlyEqualNames, int offset) {
List<IJSFVariable>resolvedVars = new ArrayList<IJSFVariable>();
if (project == null)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFFuncsELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFFuncsELCompletionEngine.java 2012-07-11 18:20:55 UTC (rev 42512)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFFuncsELCompletionEngine.java 2012-07-11 18:46:59 UTC (rev 42513)
@@ -58,7 +58,8 @@
* (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.el.AbstractELCompletionEngine#getMemberInfoByVariable(org.jboss.tools.jst.web.kb.el.AbstractELCompletionEngine.IVariable, boolean)
*/
- protected TypeInfoCollector.MemberInfo getMemberInfoByVariable(IJSFVariable var, boolean onlyEqualNames, int offset) {
+ @Override
+ protected TypeInfoCollector.MemberInfo getMemberInfoByVariable(IJSFVariable var, ELContext context, boolean onlyEqualNames, int offset) {
// Need to create artificial member info based on the Source Member type, but having only method named after the func's name
if (!(var instanceof Variable))
return null;
@@ -92,7 +93,7 @@
return resolveVariablesInternal(file, expr, isFinal, onlyEqualNames, offset);
}
- public List<IJSFVariable> resolveVariablesInternal(IFile file, ELInvocationExpression expr, boolean isFinal, boolean onlyEqualNames, int offset) {
+ private List<IJSFVariable> resolveVariablesInternal(IFile file, ELInvocationExpression expr, boolean isFinal, boolean onlyEqualNames, int offset) {
ELContext context = PageContextFactory.createPageContext(file);
if (!(context instanceof XmlContextImpl)) {
13 years, 9 months
JBoss Tools SVN: r42512 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-11 14:20:55 -0400 (Wed, 11 Jul 2012)
New Revision: 42512
Modified:
trunk/build/target-platform/unified.target
Log:
JBIDE-11469: WIP
Modified: trunk/build/target-platform/unified.target
===================================================================
--- trunk/build/target-platform/unified.target 2012-07-11 17:11:23 UTC (rev 42511)
+++ trunk/build/target-platform/unified.target 2012-07-11 18:20:55 UTC (rev 42512)
@@ -43,6 +43,7 @@
<unit id="org.hamcrest.integration" version="1.1.0.v20090501071000"/>
<!-- Orbit bundles needed for Eclipse Checkstyle (eclipse-cs) -->
+ <unit id="org.apache.lucene.core" version="3.5.0.v20120319-2345"/>
<unit id="org.apache.lucene.highlighter" version="3.5.0.v20120319-2345"/>
<unit id="org.apache.lucene.memory" version="3.5.0.v20120319-2345"/>
<unit id="org.apache.lucene.misc" version="3.5.0.v20120319-2345"/>
@@ -215,6 +216,7 @@
<!-- JBDS-1904, JBIDE-9351, JBIDE-10094 add mylyn and jira to JBT/JBDS TP -->
<unit id="org.eclipse.mylyn_feature.feature.group" version="3.8.0.v20120612-0600"/>
<unit id="org.eclipse.mylyn.ide_feature.feature.group" version="3.8.0.v20120612-0600"/>
+ <unit id="org.eclipse.mylyn.tasks.ide.feature.group" version="3.8.0.v20120612-0600"/>
<unit id="org.eclipse.mylyn.commons.feature.group" version="3.8.0.v20120612-0600"/>
<unit id="org.eclipse.mylyn.commons.compatibility.feature.group" version="3.8.0.v20120612-0600"/>
<unit id="org.eclipse.mylyn.commons.identity.feature.group" version="1.0.0.v20120612-0600"/>
@@ -236,29 +238,30 @@
<unit id="org.eclipse.mylyn.tasks.ui" version="3.8.0.v20120612-0600"/>
<unit id="org.eclipse.mylyn.tasks.core" version="3.8.0.v20120612-0600"/>
<unit id="org.eclipse.mylyn.tasks.bugs" version="3.8.0.v20120612-0600"/>
- <unit id="com.atlassian.connector.commons" version="4.0.0.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.bamboo.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.bamboo.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.branding.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.commons.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.commons.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.crucible.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.crucible.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.cvs.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.cvs.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.directclickthrough.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.fisheye.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.fisheye.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.help" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.jira.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.jira.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.monitor.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.monitor.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.subclipse.core" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.subclipse.ui" version="3.0.5.v20120518"/>
- <unit id="com.atlassian.connector.eclipse.ui" version="3.0.5.v20120518"/>
+ <unit id="com.atlassian.connector.commons" version="4.0.0.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.bamboo.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.bamboo.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.branding.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.commons.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.commons.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.crucible.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.crucible.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.cvs.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.cvs.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.directclickthrough.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.fisheye.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.fisheye.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.help" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.jira.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.jira.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.monitor.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.monitor.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.subclipse.core" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.subclipse.ui" version="3.0.6.v20120628"/>
+ <unit id="com.atlassian.connector.eclipse.ui" version="3.0.6.v20120628"/>
<unit id="com.thoughtworks.xstream" version="1.3.1.v201111240924"/>
+ <unit id="org.xmlpull" version="1.1.3.4_v2012015148"/>
<unit id="org.eclipse.ui" version="3.103.0.v20120521-2329"/>
<unit id="org.eclipse.core.runtime" version="3.8.0.v20120521-2346"/>
<unit id="org.eclipse.core.resources" version="3.8.0.v20120522-2034"/>
@@ -282,6 +285,7 @@
<unit id="org.mortbay.jetty.server" version="6.1.23.v201012071420"/>
<unit id="org.mortbay.jetty.util" version="6.1.23.v201012071420"/>
<unit id="org.apache.jasper" version="7.0.26.v201205030742"/>
+ <unit id="org.apache.catalina" version="7.0.26.v201205021508"/>
<unit id="org.joda.time" version="1.6.0.v20081202-0100"/>
<unit id="javax.servlet" version="3.0.0.v201112011016"/>
<unit id="javax.servlet.jsp" version="2.2.0.v201112011158"/>
13 years, 9 months
JBoss Tools SVN: r42511 - trunk/forge/tests/org.jboss.tools.forge.ui.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-07-11 13:11:23 -0400 (Wed, 11 Jul 2012)
New Revision: 42511
Modified:
trunk/forge/tests/org.jboss.tools.forge.ui.test/pom.xml
Log:
disabled forge.ui.test plugin until there are tests in it
Modified: trunk/forge/tests/org.jboss.tools.forge.ui.test/pom.xml
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.ui.test/pom.xml 2012-07-11 16:49:10 UTC (rev 42510)
+++ trunk/forge/tests/org.jboss.tools.forge.ui.test/pom.xml 2012-07-11 17:11:23 UTC (rev 42511)
@@ -9,6 +9,7 @@
<groupId>org.jboss.tools.forge.tests</groupId>
<artifactId>org.jboss.tools.forge.ui.test</artifactId>
- <!-- TODO: this is a test plugin. It needs test classes. -->
- <packaging>eclipse-test-plugin</packaging>
+ <!-- TODO: this is a test plugin. It needs test classes. -->
+ <!-- TODO: change to eclipse-test-pugin when test classes are added -->
+ <packaging>eclipse-plugin</packaging>
</project>
13 years, 9 months
JBoss Tools SVN: r42510 - in trunk/download.jboss.org/jbosstools/updates: requirements/atlassian and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-11 12:49:10 -0400 (Wed, 11 Jul 2012)
New Revision: 42510
Modified:
trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeArtifacts.xml
trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeContent.xml
trunk/download.jboss.org/jbosstools/updates/requirements/atlassian/build.xml
Log:
JBIDE-12316: Latest Atlassian connectors
Modified: trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeArtifacts.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeArtifacts.xml 2012-07-11 15:12:31 UTC (rev 42509)
+++ trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeArtifacts.xml 2012-07-11 16:49:10 UTC (rev 42510)
@@ -8,7 +8,7 @@
<children size='11'>
<!-- new for Juno -->
<child location='../../requirements/juno/201206270900-R/'/>
-<child location='../../requirements/atlassian/3.0.5.v20120518/'/>
+<child location='../../requirements/atlassian/3.0.6.v20120628/'/>
<child location='../../requirements/birt/4.2.0.v20120613/'/>
<child location='../../requirements/eclipse/R-4.2-201206081400/'/>
<child location='../../requirements/orbit/R20120526062928/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeContent.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeContent.xml 2012-07-11 15:12:31 UTC (rev 42509)
+++ trunk/download.jboss.org/jbosstools/updates/juno/SR0/compositeContent.xml 2012-07-11 16:49:10 UTC (rev 42510)
@@ -8,7 +8,7 @@
<children size='11'>
<!-- new for Juno -->
<child location='../../requirements/juno/201206270900-R/'/>
-<child location='../../requirements/atlassian/3.0.5.v20120518/'/>
+<child location='../../requirements/atlassian/3.0.6.v20120628/'/>
<child location='../../requirements/birt/4.2.0.v20120613/'/>
<child location='../../requirements/eclipse/R-4.2-201206081400/'/>
<child location='../../requirements/orbit/R20120526062928/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/atlassian/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/atlassian/build.xml 2012-07-11 15:12:31 UTC (rev 42509)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/atlassian/build.xml 2012-07-11 16:49:10 UTC (rev 42510)
@@ -10,8 +10,8 @@
or, run headless on qa01 server, where Eclipse is installed into ~/eclipse:
export JAVA_HOME=/opt/jdk1.6.0; \
- ${JAVA_HOME}/bin/java -cp ~/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
- <iu id="org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
+ ${JAVA_HOME}/bin/java jar ~/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
+ -consoleLog -nosplash -data /tmp \
-application org.eclipse.ant.core.antRunner \
-f ~/RHDS/updates/requirements/atlassian/build.xml -Ddestination=/tmp/atlassian-repo
-->
@@ -21,12 +21,12 @@
<!-- <property name="URL1" value="http://download.eclipse.org/mylyn/releases/latest" /> -->
<!-- TODO: make sure that the version of Mylyn in Juno (or on the URL above?) is the same as the version used on the Atlassian site! -->
- <property name="URL1" value="http://update.atlassian.com/atlassian-eclipse-plugin/e3.7" />
+ <property name="URL1" value="http://update.atlassian.com/atlassian-eclipse-plugin/e3.8" />
<property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/atlassian/3.0.5.v20120518/" />
<property name="compress" value="true" />
<p2.mirror>
- <repository location="file:${destination}/3.0.5.v20120518" name="atlassian 3.0.5.v20120518" />
+ <repository location="file:${destination}/3.0.6.v20120628" name="atlassian 3.0.6.v20120628" />
<source>
<repository location="${URL1}" />
</source>
@@ -41,6 +41,6 @@
<iu id="com.atlassian.connector.eclipse.subversive.feature.group" />
</p2.mirror>
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/3.0.5.v20120518/" artifactRepository="file:${destination}/3.0.5.v20120518/" publishartifacts="true" source="${destination}/3.0.5.v20120518/" compress="${compress}" />
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/3.0.6.v20120628/" artifactRepository="file:${destination}/3.0.6.v20120628/" publishartifacts="true" source="${destination}/3.0.6.v20120628/" compress="${compress}" />
</target>
</project>
13 years, 9 months
JBoss Tools SVN: r42509 - in trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe: editor/util and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-07-11 11:12:31 -0400 (Wed, 11 Jul 2012)
New Revision: 42509
Added:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/util/
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/util/VpeStyleUtilTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllImportantTests.java
Log:
https://issues.jboss.org/browse/JBIDE-12308 : VPE throws StackOverflowError and visual part is blank
Added: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/util/VpeStyleUtilTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/util/VpeStyleUtilTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/util/VpeStyleUtilTest.java 2012-07-11 15:12:31 UTC (rev 42509)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.util;
+
+import junit.framework.TestCase;
+
+public class VpeStyleUtilTest extends TestCase {
+
+ @SuppressWarnings("nls")
+ public void testRemoveAllCssComments() {
+ assertEquals("", VpeStyleUtil.removeAllCssComments(""));
+ assertEquals(" ", VpeStyleUtil.removeAllCssComments("/*"));
+ assertEquals(" ", VpeStyleUtil.removeAllCssComments("/**/"));
+ assertEquals(" ", VpeStyleUtil.removeAllCssComments("/*/**/"));
+ assertEquals(" ", VpeStyleUtil.removeAllCssComments("/*//**/"));
+ assertEquals(" dddd ", VpeStyleUtil.removeAllCssComments("/*abcv*/dddd/**/"));
+ assertEquals("bvc dddd ", VpeStyleUtil.removeAllCssComments("bvc/*abcv*/dddd/**/"));
+ assertEquals("bvc dddd ", VpeStyleUtil.removeAllCssComments("bvc/*abcv*/dddd/*"));
+ }
+
+}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllImportantTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllImportantTests.java 2012-07-11 14:40:38 UTC (rev 42508)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllImportantTests.java 2012-07-11 15:12:31 UTC (rev 42509)
@@ -11,6 +11,7 @@
package org.jboss.tools.vpe.test;
import org.jboss.tools.vpe.editor.template.VpeTemplateManagerTest;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtilTest;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -25,6 +26,7 @@
public static Test suite() {
TestSuite suite = new TestSuite(VpeAllImportantTests.class.getName());
//$JUnit-BEGIN$
+ suite.addTestSuite(VpeStyleUtilTest.class);
suite.addTestSuite(TemplateLoadingTest.class);
suite.addTestSuite(TemplateSchemeValidateTest.class);
suite.addTestSuite(TemplatesExpressionParsingTest.class);
13 years, 9 months
JBoss Tools SVN: r42508 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-07-11 10:40:38 -0400 (Wed, 11 Jul 2012)
New Revision: 42508
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
Log:
JBIDE-10611
As-you-type CDI validation
Improved Dirty Regions Processing due to exclude extra validation calls.
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-07-11 13:07:36 UTC (rev 42507)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-07-11 14:40:38 UTC (rev 42508)
@@ -335,7 +335,7 @@
}
int start = dirtyRegion.getOffset();
- int end = dirtyRegion.getOffset() + dirtyRegion.getLength();
+ int end = DirtyRegion.REMOVE.equals(dirtyRegion.getType()) ? dirtyRegion.getOffset() : dirtyRegion.getOffset() + dirtyRegion.getLength();
// Check the document boundaries
int docLen = doc.getLength();
@@ -376,9 +376,6 @@
ITypedRegion[] partitions = computePartitioning(start, end - start);
- if (fReporter != null) {
- fReporter.clearAnnotations(start, end);
- }
for (ITypedRegion partition : partitions) {
if (partition != null && !fIsCanceled) {
if (IJavaPartitions.JAVA_STRING.equals(partition.getType()) && !fPartitionsToProcess.contains(partition)) {
@@ -404,7 +401,7 @@
fValidatorManager.validateString(partition, fHelper, fReporter);
}
- if (isJavaElementValidationRequired(fStartRegionToProcess, fEndRegionToProcess)) {
+ if (isJavaElementValidationRequired()) {
// try {
// System.out.println("validateJavaElement: " + fStartRegionToProcess + "->" + fEndRegionToProcess + ": [" + fDocument.get(fStartRegionToProcess, fEndRegionToProcess - fStartRegionToProcess)+ "]");
// } catch (BadLocationException e) {
@@ -414,13 +411,27 @@
}
}
- private boolean isJavaElementValidationRequired(int start, int end) {
+ private boolean isJavaElementValidationRequired() {
ICompilationUnit unit = fReporter.getCompilationUnit();
if (unit == null)
return false;
boolean result = false;
boolean atLeastOneElementIsProcessed = false;
+
+ int start = fStartRegionToProcess;
+ int end = fEndRegionToProcess;
+
+ ITypedRegion[] partitions = computePartitioning(fStartPartitionsToProcess, fEndPartitionsToProcess - fStartPartitionsToProcess);
+
+ ITypedRegion startPartition = findPartitionByOffset(partitions, start);
+ ITypedRegion endPartition = (startPartition != null && end >= startPartition.getOffset() && end < startPartition.getOffset() + startPartition.getLength()) ?
+ startPartition : findPartitionByOffset(partitions, end);
+
+ if (startPartition != null && startPartition.equals(endPartition) && !isProcessingRequiredForPartition(startPartition)) {
+ return false;
+ }
+
int position = start;
try {
IJavaElement element = null;
@@ -431,12 +442,18 @@
position = 0;
while (position < end) {
+ ITypedRegion partition = findPartitionByOffset(partitions, position);
+ if(!isProcessingRequiredForPartition(partition)) {
+ position = partition.getOffset() + partition.getLength();
+ continue;
+ }
+
element = unit.getElementAt(position++);
- if (element != null) {
- atLeastOneElementIsProcessed = true;
- if (element.getElementType() == IJavaElement.METHOD)
- continue;
-
+ if (element == null)
+ continue;
+
+ atLeastOneElementIsProcessed = true;
+ if (element.getElementType() != IJavaElement.METHOD) {
IJavaElement parent = element.getParent();
boolean doSkipThisElement = false;
while (parent != null && parent.getElementType() != IJavaElement.COMPILATION_UNIT) {
@@ -455,8 +472,26 @@
LogHelper.logError(CommonValidationPlugin.getDefault(), e);
}
- result = atLeastOneElementIsProcessed ? result : true;
- return result ;
+ return atLeastOneElementIsProcessed ? result : true;
}
+ private ITypedRegion findPartitionByOffset(ITypedRegion[] partitions, int offset) {
+ if (partitions == null)
+ return null;
+
+ for (ITypedRegion partition : partitions) {
+ if (offset >= partition.getOffset() && offset < partition.getOffset() + partition.getLength())
+ return partition;
+ }
+
+ return null;
+ }
+
+ private boolean isProcessingRequiredForPartition(ITypedRegion partition) {
+ String type = partition.getType();
+ return !(IJavaPartitions.JAVA_STRING.equals(type) || IJavaPartitions.JAVA_CHARACTER.equals(type) ||
+ IJavaPartitions.JAVA_SINGLE_LINE_COMMENT.equals(type) ||
+ IJavaPartitions.JAVA_MULTI_LINE_COMMENT.equals(type) || IJavaPartitions.JAVA_DOC.equals(type));
+ }
+
}
\ No newline at end of file
13 years, 9 months