JBoss Tools SVN: r37080 - branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-12-07 16:38:33 -0500 (Wed, 07 Dec 2011)
New Revision: 37080
Removed:
branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/bin/
branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/jboss-modules.jar
branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/licence.txt
branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/modules/
branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/readme.txt
Log:
JBIDE-10403: remove runtime 1.0.0.beta3
Deleted: branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/jboss-modules.jar
===================================================================
(Binary files differ)
Deleted: branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/licence.txt
===================================================================
--- branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/licence.txt 2011-12-07 20:26:22 UTC (rev 37079)
+++ branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/licence.txt 2011-12-07 21:38:33 UTC (rev 37080)
@@ -1,84 +0,0 @@
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
- b) in the case of each subsequent Contributor:
-
- i)changes to the Program, and
-
- ii)additions to the Program;
-
- where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-
-b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program.
-
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-
- iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the Program.
-
-Contributors may not remove or alter any copyright notices contained within the Program.
-
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any clai!
ms or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) !
and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file
Deleted: branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/readme.txt
===================================================================
--- branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/readme.txt 2011-12-07 20:26:22 UTC (rev 37079)
+++ branches/jbosstools-3.3.0.M5/forge/plugins/org.jboss.tools.forge.runtime/readme.txt 2011-12-07 21:38:33 UTC (rev 37080)
@@ -1,11 +0,0 @@
- ____ _____
- / ___| ___ __ _ _ __ ___ | ___|__ _ __ __ _ ___
- \___ \ / _ \/ _` | '_ ` _ \ | |_ / _ \| '__/ _` |/ _ \ \\
- ___) | __/ (_| | | | | | | | _| (_) | | | (_| | __/ //
- |____/ \___|\__,_|_| |_| |_| |_| \___/|_| \__, |\___|
- |___/
-
-
-Reference Guide:
-----------------
- https://docs.jboss.org/author/display/SEAMFORGE/
14 years, 4 months
JBoss Tools SVN: r37079 - branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2011-12-07 15:26:22 -0500 (Wed, 07 Dec 2011)
New Revision: 37079
Modified:
branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java
branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedEventFilter.java
Log:
OPEN - issue JBIDE-10397 Renaming a Type does not remove the endpoints associated with the old type
https://issues.jboss.org/browse/JBIDE-10397
Modified: branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java
===================================================================
--- branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java 2011-12-07 19:58:14 UTC (rev 37078)
+++ branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java 2011-12-07 20:26:22 UTC (rev 37079)
@@ -100,6 +100,8 @@
compilationUnitAST, new int[0]);
if (filter.apply(event)) {
events.add(event);
+ } else {
+ Logger.debug("Event {} **rejected** ", event);
}
} else if (javaFileWithMarkers) {
ICompilationUnit compilationUnit = JdtUtils.getCompilationUnit(delta.getResource());
Modified: branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedEventFilter.java
===================================================================
--- branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedEventFilter.java 2011-12-07 19:58:14 UTC (rev 37078)
+++ branches/jbosstools-3.3.0.M5/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedEventFilter.java 2011-12-07 20:26:22 UTC (rev 37079)
@@ -46,7 +46,7 @@
addRule(COMPILATION_UNIT, ADDED, PRIMARY_COPY);
addRule(COMPILATION_UNIT, CHANGED, PRIMARY_COPY, F_CONTENT, F_PRIMARY_RESOURCE);
- addRule(COMPILATION_UNIT, REMOVED, PRIMARY_COPY);
+ addRule(COMPILATION_UNIT, REMOVED, PRIMARY_COPY+WORKING_COPY);
addRule(TYPE, ADDED, PRIMARY_COPY + WORKING_COPY);
// Supertypes changes. Renaming a type ends up with
14 years, 4 months
JBoss Tools SVN: r37078 - trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2011-12-07 14:58:14 -0500 (Wed, 07 Dec 2011)
New Revision: 37078
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedEventFilter.java
Log:
OPEN - issue JBIDE-10397: Renaming a Type does not remove the endpoints associated with the old type
https://issues.jboss.org/browse/JBIDE-10397
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java 2011-12-07 19:02:55 UTC (rev 37077)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java 2011-12-07 19:58:14 UTC (rev 37078)
@@ -92,14 +92,17 @@
&& (delta.getFlags() & IResourceDelta.MARKERS) != 0;
final boolean javaFileRemoved = isJavaFile && delta.getKind() == REMOVED;
if ((javaFileAdded || javaFileRemoved)) {
- Logger.debug("File {} {}", resource,
+ Logger.debug("File {} {}", resource,
ConstantUtils.getStaticFieldName(IResourceDelta.class, delta.getKind()));
ICompilationUnit compilationUnit = JdtUtils.getCompilationUnit(delta.getResource());
CompilationUnit compilationUnitAST = compilationUnitsRepository.getAST(compilationUnit);
JavaElementChangedEvent event = new JavaElementChangedEvent(compilationUnit, delta.getKind(),
compilationUnitAST, new int[0]);
+
if (filter.apply(event)) {
events.add(event);
+ } else {
+ Logger.debug("Event {} **rejected** ", event);
}
} else if (javaFileWithMarkers) {
ICompilationUnit compilationUnit = JdtUtils.getCompilationUnit(delta.getResource());
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedEventFilter.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedEventFilter.java 2011-12-07 19:02:55 UTC (rev 37077)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedEventFilter.java 2011-12-07 19:58:14 UTC (rev 37078)
@@ -46,7 +46,7 @@
addRule(COMPILATION_UNIT, ADDED, PRIMARY_COPY);
addRule(COMPILATION_UNIT, CHANGED, PRIMARY_COPY, F_CONTENT, F_PRIMARY_RESOURCE);
- addRule(COMPILATION_UNIT, REMOVED, PRIMARY_COPY);
+ addRule(COMPILATION_UNIT, REMOVED, PRIMARY_COPY +WORKING_COPY);
addRule(TYPE, ADDED, PRIMARY_COPY + WORKING_COPY);
// Supertypes changes. Renaming a type ends up with
14 years, 4 months
JBoss Tools SVN: r37077 - trunk/portlet/tests.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-12-07 14:02:55 -0500 (Wed, 07 Dec 2011)
New Revision: 37077
Modified:
trunk/portlet/tests/pom.xml
Log:
* added new org.jboss.tools.portlet.ui.bot.test module to the pom.xml
Modified: trunk/portlet/tests/pom.xml
===================================================================
--- trunk/portlet/tests/pom.xml 2011-12-07 18:49:56 UTC (rev 37076)
+++ trunk/portlet/tests/pom.xml 2011-12-07 19:02:55 UTC (rev 37077)
@@ -14,5 +14,6 @@
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.portlet.core.test</module>
+ <module>org.jboss.tools.portlet.ui.bot.test</module>
</modules>
-</project>
\ No newline at end of file
+</project>
14 years, 4 months
JBoss Tools SVN: r37076 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-12-07 13:49:56 -0500 (Wed, 07 Dec 2011)
New Revision: 37076
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/CDIFileChange.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
Log:
EL refactoring for @Named beans doesn't work properly https://issues.jboss.org/browse/JBIDE-10210
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 2011-12-07 18:44:25 UTC (rev 37075)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/AddQualifiersToBeanProcessor.java 2011-12-07 18:49:56 UTC (rev 37076)
@@ -102,7 +102,7 @@
ICompilationUnit compilationUnit = original.getWorkingCopy(pm);
TextFileChange fileChange = new CDIFileChange(file.getName(), file);
- if(CDIFileChange.getEditor(file) != null)
+ if(CDIFileChange.getAndReloadEditor(file) != null)
fileChange.setSaveMode(TextFileChange.LEAVE_DIRTY);
else
fileChange.setSaveMode(TextFileChange.FORCE_SAVE);
@@ -122,7 +122,7 @@
rootChange.add(fileChange);
}
fileChange = new CDIFileChange(file2.getName(), file2);
- if(CDIFileChange.getEditor(file2) != null)
+ if(CDIFileChange.getAndReloadEditor(file2) != null)
fileChange.setSaveMode(TextFileChange.LEAVE_DIRTY);
else
fileChange.setSaveMode(TextFileChange.FORCE_SAVE);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIFileChange.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIFileChange.java 2011-12-07 18:44:25 UTC (rev 37075)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIFileChange.java 2011-12-07 18:49:56 UTC (rev 37076)
@@ -21,6 +21,7 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
import org.jboss.tools.cdi.core.CDICorePlugin;
public class CDIFileChange extends TextFileChange{
@@ -44,16 +45,28 @@
});
}
+ public static IEditorPart getAndReloadEditor(IFile file){
+ IEditorInput input = EditorUtility.getEditorInput(file);
+
+ if(EditorUtility.isOpenInEditor(input) != null){
+ try {
+ return EditorUtility.openInEditor(input, false);
+ } catch (PartInitException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
+ return null;
+ }
+
public static IEditorPart getEditor(IFile file){
- IEditorInput ii = EditorUtility.getEditorInput(file);
+ IEditorInput input = EditorUtility.getEditorInput(file);
IWorkbenchWindow[] windows = CDICorePlugin.getDefault().getWorkbench().getWorkbenchWindows();
for(IWorkbenchWindow window : windows){
- IEditorPart editor = window.getActivePage().findEditor(ii);
+ IEditorPart editor = window.getActivePage().findEditor(input);
if(editor != null)
return editor;
}
return null;
}
-
}
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 2011-12-07 18:44:25 UTC (rev 37075)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRefactoringProcessor.java 2011-12-07 18:49:56 UTC (rev 37076)
@@ -57,7 +57,7 @@
rootChange = new CompositeChange(label);
change = new CDIFileChange(file.getName(), file);
- if(CDIFileChange.getEditor(file) != null)
+ if(CDIFileChange.getAndReloadEditor(file) != null)
change.setSaveMode(TextFileChange.LEAVE_DIRTY);
else
change.setSaveMode(TextFileChange.FORCE_SAVE);
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-12-07 18:44:25 UTC (rev 37075)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2011-12-07 18:49:56 UTC (rev 37076)
@@ -90,7 +90,7 @@
}
lastChange = new CDIFileChange(file.getName(), file);
- if(CDIFileChange.getEditor(file) != null)
+ if(CDIFileChange.getAndReloadEditor(file) != null)
lastChange.setSaveMode(TextFileChange.LEAVE_DIRTY);
else
lastChange.setSaveMode(TextFileChange.FORCE_SAVE);
14 years, 4 months
JBoss Tools SVN: r37075 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-12-07 13:44:25 -0500 (Wed, 07 Dec 2011)
New Revision: 37075
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common/FileUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
Log:
[JBIDE-10402] cloning OpenShift application to temporary folder and removing it afterwards
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common/FileUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common/FileUtils.java 2011-12-07 18:25:21 UTC (rev 37074)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common/FileUtils.java 2011-12-07 18:44:25 UTC (rev 37075)
@@ -52,6 +52,16 @@
&& file.isDirectory();
}
+ public static File getSystemTmpFolder() {
+ String tmpFolder = System.getProperty("java.io.tmpdir");
+ return new File(tmpFolder);
+ }
+
+ public static File getRandomTmpFolder() {
+ String randomName = String.valueOf(System.currentTimeMillis());
+ return new File(getSystemTmpFolder(), randomName);
+ }
+
/**
* Copies the ginve source to the given destination recursively. Overwrites
* existing files/directory on the destination path if told so.
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-12-07 18:25:21 UTC (rev 37074)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-12-07 18:44:25 UTC (rev 37075)
@@ -287,11 +287,15 @@
// model.shareProject(monitor);
// model.mergeWithApplicationRepository(repository,
// monitor);
- File repositoryFile = cloneRepository(monitor);
+ File tmpFolder = FileUtils.getRandomTmpFolder();
+ File repositoryFile = cloneRepository(tmpFolder, monitor);
+ tmpFolder.delete();
+
copyOpenshiftConfiguration(repositoryFile, monitor);
shareProject(monitor);
createServerAdapterIfRequired(monitor);
}
+
public void mergeWithApplicationRepository(Repository repository, IProgressMonitor monitor)
throws MalformedURLException, URISyntaxException, IOException, OpenShiftException, CoreException,
@@ -350,8 +354,14 @@
private File cloneRepository(IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException, URISyntaxException {
IApplication application = getApplication();
+ File destination = new File(getRepositoryPath(), application.getName());
+ return cloneRepository(destination, monitor);
+ }
+
+ private File cloneRepository(File destination, IProgressMonitor monitor)
+ throws OpenShiftException, InvocationTargetException, InterruptedException, URISyntaxException {
+ IApplication application = getApplication();
monitor.subTask(NLS.bind("Cloning repository for application {0}...", application.getName()));
- File destination = new File(getRepositoryPath(), application.getName());
cloneRepository(application.getGitUri(), destination, monitor);
return destination;
}
14 years, 4 months
JBoss Tools SVN: r37074 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-07 13:25:21 -0500 (Wed, 07 Dec 2011)
New Revision: 37074
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/impl/JavaAnnotation.java
Log:
JBIDE-10187
https://issues.jboss.org/browse/JBIDE-10187
Fix for method JavaAnnotation.getParentMember().
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/impl/JavaAnnotation.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/impl/JavaAnnotation.java 2011-12-07 18:14:50 UTC (rev 37073)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/impl/JavaAnnotation.java 2011-12-07 18:25:21 UTC (rev 37074)
@@ -12,6 +12,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.ISourceRange;
@@ -75,7 +76,14 @@
}
public IMember getParentMember() {
- return (IMember)annotation.getParent();
+ IJavaElement ancestor = annotation.getParent();
+ while(ancestor != null) {
+ if(ancestor instanceof IMember) {
+ return (IMember)ancestor;
+ }
+ ancestor = ancestor.getParent();
+ }
+ return null;
}
public IMemberValuePair[] getMemberValuePairs() {
14 years, 4 months
JBoss Tools SVN: r37073 - in trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf: ui/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-12-07 13:14:50 -0500 (Wed, 07 Dec 2011)
New Revision: 37073
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAJsfResourceBundlePropertyApplyTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
Log:
JBIDE-10320 Code assist for #{messages['...']} does not work properly
JUnit Test is added for issue
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAJsfResourceBundlePropertyApplyTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAJsfResourceBundlePropertyApplyTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAJsfResourceBundlePropertyApplyTest.java 2011-12-07 18:14:50 UTC (rev 37073)
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.jsp.ca.test;
+
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.jboss.tools.common.base.test.contentassist.CATestUtil;
+import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
+
+/**
+ * The JUnit test case for issue JBIDE-10320
+ *
+ * @author Victor V. Rubezhny
+ *
+ */public class CAJsfResourceBundlePropertyApplyTest extends ContentAssistantTestCase {
+ private static final String PROJECT_NAME = "JSF2KickStartWithoutLibs";
+ private static final String PAGE_NAME = "WebContent/pages/inputname.xhtml";
+
+ private static final String INSERT_BEFORE[] = {"<ui:define", "<h:message"};
+ private static final String INSERTION[] = {"<h:outputText value=\"#{msgs[]\"\r\n", "#{msgs[]\r\n"};
+ private static final String TEMPLATE = "#{msgs[";
+ private static final String PROPOSAL_TO_APPLY_STRING = "msgs['prompt']}";
+ private static final String COMPARE_STRING[] = {"#{msgs['prompt']}\"", "#{msgs['prompt']}"};
+ private static final String END_OF_SEQUENCE[] = {"\"", "]"};
+
+ private TestProjectProvider provider = null;
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.jsf.ui.test", null, PROJECT_NAME,false); //$NON-NLS-1$
+ project = provider.getProject();
+ }
+
+ public static Test suite() {
+ return new TestSuite(CAJsfResourceBundlePropertyApplyTest.class);
+ }
+
+ @SuppressWarnings("restriction")
+ private void doTestCAJsfResourceBundlePropertyApply(String insertBefore, String insertion, String endOfSequence, String template, String proposalToApply, String compareString) {
+ // Find start of <ui:composition> tag
+ String documentContent = document.get();
+
+ int start = (documentContent == null ? -1 : documentContent.indexOf(insertBefore));
+ assertFalse("Required text '" + insertBefore + "' not found in document", (start == -1));
+
+ String newDocumentContent = documentContent.substring(0, start) +
+ insertion + documentContent.substring(start);
+
+ start = (newDocumentContent == null ? -1 : newDocumentContent.indexOf(template, start));
+ assertTrue("Cannot find the starting point in the test file \"" + PAGE_NAME + "\"", (start != -1));
+ int offsetToTest = start + template.length();
+
+ // Make the document text to compare
+ int endOfSequencePosition = newDocumentContent.indexOf(endOfSequence, start);
+ assertTrue("Cannot find the ending point in the test file \"" + PAGE_NAME + "\"", (endOfSequencePosition != -1));
+ endOfSequencePosition += endOfSequence.length();
+
+ String documentContentToCompare = newDocumentContent.substring(0, start) +
+ compareString + newDocumentContent.substring(endOfSequencePosition);
+
+ // Update the document with a new text
+ document.set(newDocumentContent);
+ JobUtils.waitForIdle();
+
+ List<ICompletionProposal> res = CATestUtil.collectProposals(contentAssistant, viewer, offsetToTest);
+
+ assertTrue("Content Assistant returned no proposals", (res != null && res.size() > 0));
+
+ boolean bPropoosalToApplyFound = false;
+ for (ICompletionProposal p : res) {
+ if (!(p instanceof AutoContentAssistantProposal))
+ continue;
+ AutoContentAssistantProposal proposal = (AutoContentAssistantProposal)p;
+ String proposalString = proposal.getReplacementString();
+
+ if (proposalToApply.equals(proposalString)) {
+ bPropoosalToApplyFound = true;
+ proposal.apply(document);
+ break;
+ }
+ }
+ assertTrue("The proposal to apply not found.", bPropoosalToApplyFound);
+
+ JobUtils.waitForIdle();
+
+ String documentUpdatedContent = document.get();
+ assertTrue("The proposal replacement is failed.", documentContentToCompare.equals(documentUpdatedContent));
+ }
+
+ public void testdoTestCAJsfResourceBundlePropertyApplyInAttributeValue() {
+ assertNotNull("Test project '" + PROJECT_NAME + "' is not prepared", project);
+
+ openEditor(PAGE_NAME);
+ try {
+ doTestCAJsfResourceBundlePropertyApply(INSERT_BEFORE[0], INSERTION[0], END_OF_SEQUENCE[0], TEMPLATE, PROPOSAL_TO_APPLY_STRING, COMPARE_STRING[0]);
+ } finally {
+ closeEditor();
+ }
+ }
+
+ public void testdoTestCAJsfResourceBundlePropertyApplyInTextBody() {
+ assertNotNull("Test project '" + PROJECT_NAME + "' is not prepared", project);
+
+ openEditor(PAGE_NAME);
+ try {
+ doTestCAJsfResourceBundlePropertyApply(INSERT_BEFORE[1], INSERTION[1], END_OF_SEQUENCE[1], TEMPLATE, PROPOSAL_TO_APPLY_STRING, COMPARE_STRING[1]);
+ } finally {
+ closeEditor();
+ }
+ }
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAJsfResourceBundlePropertyApplyTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-12-07 18:14:19 UTC (rev 37072)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-12-07 18:14:50 UTC (rev 37073)
@@ -29,6 +29,7 @@
import org.jboss.tools.jsf.jsp.ca.test.CAJsfAddInfoInELMessagesTest;
import org.jboss.tools.jsf.jsp.ca.test.CAJsfMessagesProposalsFilteringTest;
import org.jboss.tools.jsf.jsp.ca.test.CAJsfMessagesProposalsTest;
+import org.jboss.tools.jsf.jsp.ca.test.CAJsfResourceBundlePropertyApplyTest;
import org.jboss.tools.jsf.jsp.ca.test.CANotEmptyWhenThereIsNoSpaceBetweenInvertedCommandsInAttributeJBIDE1759Test;
import org.jboss.tools.jsf.jsp.ca.test.CASuggestsNotOnlyELProposalsJBIDE2437Test;
import org.jboss.tools.jsf.jsp.ca.test.CAUnnecessaryElementsForDirAttributeInXHTMLPageJBIDE1813Test;
@@ -157,6 +158,11 @@
new String[] { "projects/JSF2KickStartWithoutLibs", }, //$NON-NLS-1$
new String[] { "JSF2KickStartWithoutLibs" })); //$NON-NLS-1$
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(
+ CAJsfResourceBundlePropertyApplyTest.class), "org.jboss.tools.jsf.test", //$NON-NLS-1$
+ new String[] { "projects/JSF2KickStartWithoutLibs", }, //$NON-NLS-1$
+ new String[] { "JSF2KickStartWithoutLibs" })); //$NON-NLS-1$
+
// return new TestWizardsProject(suite);
return suite;
}
14 years, 4 months
JBoss Tools SVN: r37071 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-12-07 13:14:11 -0500 (Wed, 07 Dec 2011)
New Revision: 37071
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java
Log:
JBIDE-10320 Code assist for #{messages['...']} does not work properly
Issue is fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java 2011-12-07 18:12:30 UTC (rev 37070)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java 2011-12-07 18:14:11 UTC (rev 37071)
@@ -191,8 +191,8 @@
if (proposals == null || proposals.length == 0)
return;
- String restOfValue = getRestOfEL(context.getDocument(), context.getInvocationOffset());
for (TextProposal textProposal : proposals) {
+ String restOfValue = getRestOfEL(context.getDocument(), context.getInvocationOffset());
int replacementOffset = beginChangeOffset;
int replacementLength = prefix.getLength();
String replacementString = prefix.getText().substring(0, replacementLength);
@@ -237,16 +237,9 @@
replacementString = replacementString.substring(0, replacementString.length() -1);
}
}
- cursorPosition = replacementString.length(); // Cursor will be put right after the replacement
- if (replacementString.indexOf(']') == -1) { // Find closing square bracket in restOfValue
- if (restOfValue.indexOf(']') != -1) {
- cursorPosition += restOfValue.indexOf(']') + 1;
- }
- }
if (restOfValue.indexOf('}') == -1) {
// Add closing }-char
-
if (replacementString.indexOf(']') == -1 && restOfValue.indexOf(']') != -1) {
// Need to move chars before ']' (including this char) from restOfValue to replacementString before adding closing '}'-char
int shift = restOfValue.indexOf(']') + 1;
@@ -261,7 +254,15 @@
replacementString += "}"; //$NON-NLS-1$
}
}
-
+
+ cursorPosition = replacementString.length(); // Cursor will be put right after the replacement
+ if (replacementString.indexOf(']') == -1) { // Find closing square bracket in restOfValue
+ if (restOfValue.indexOf(']') != -1) {
+ cursorPosition += restOfValue.indexOf(']') + 1;
+ }
+ } else {
+ cursorPosition = replacementString.indexOf(']') + 1;
+ }
if (prefix.isAttributeValue() && prefix.hasOpenQuote() && !prefix.hasCloseQuote()) {
replacementString += String.valueOf(quoteChar);
}
@@ -337,8 +338,8 @@
if (proposals == null || proposals.length == 0)
return;
- String restOfValue = getRestOfEL(context.getDocument(), context.getInvocationOffset());
for (TextProposal textProposal : proposals) {
+ String restOfValue = getRestOfEL(context.getDocument(), context.getInvocationOffset());
int replacementOffset = beginChangeOffset;
int replacementLength = prefix.getLength();
String replacementString = prefix.getText().substring(0, replacementLength);
@@ -388,6 +389,13 @@
if (restOfValue.indexOf('}') == -1) {
// Add closing }-char
+ if (replacementString.indexOf(']') == -1 && restOfValue.indexOf(']') != -1) {
+ // Need to move chars before ']' (including this char) from restOfValue to replacementString before adding closing '}'-char
+ int shift = restOfValue.indexOf(']') + 1;
+ replacementString += restOfValue.substring(0, shift);
+ replacementLength += shift;
+ restOfValue = restOfValue.substring(shift);
+ }
replacementString += '}';
}
} else {
14 years, 4 months