JBoss Tools SVN: r7533 - trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-04-15 09:44:34 -0400 (Tue, 15 Apr 2008)
New Revision: 7533
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo/InstallTest.java
Log:
JBIDE-2052 Test
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo/InstallTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo/InstallTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo/InstallTest.java 2008-04-15 13:44:34 UTC (rev 7533)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package demo;
+
+import javax.persistence.Entity;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.Component;
+
+/**
+ * Created by JBoss Developer Studio
+ */
+
+@Name("installWithoutPrecedence_JBIDE_2052")
+(a)Scope(ScopeType.APPLICATION)
+@Entity
+@Install(false)
+public class InstallTest {
+
+}
18 years
JBoss Tools SVN: r7532 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-04-15 09:43:40 -0400 (Tue, 15 Apr 2008)
New Revision: 7532
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
Log:
JBIDE-2052 Test
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2008-04-15 12:57:49 UTC (rev 7531)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2008-04-15 13:43:40 UTC (rev 7532)
@@ -485,6 +485,14 @@
ISeamComponent c = seamProject.getComponent("inner_JBIDE_1374");
assertTrue("Component inner_JBIDE_1374 declared in inner static class is not found.", c != null);
}
+
+ public void testInstallWithoutPrecedence_JBIDE_2052() {
+ ISeamProject seamProject = getSeamProject();
+ ISeamComponent c = seamProject.getComponent("installWithoutPrecedence_JBIDE_2052");
+ // actually, exception may happen in building Seam project
+ assertNotNull("Component installWithoutPrecedence_JBIDE_2052 declared in class annotated with @Install(false) is not found.", c);
+
+ }
@Override
protected void tearDown() throws Exception {
18 years
JBoss Tools SVN: r7531 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-04-15 08:57:49 -0400 (Tue, 15 Apr 2008)
New Revision: 7531
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2008
Updated dialog messages and 'Save' state
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.java 2008-04-15 11:01:35 UTC (rev 7530)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.java 2008-04-15 12:57:49 UTC (rev 7531)
@@ -20,9 +20,15 @@
private static final String BUNDLE_NAME= "org.hibernate.eclipse.jdt.ui.internal.JdtUIMessages";//$NON-NLS-1$
+ public static String SaveQueryEditorListener_hql_editor;
+
+ public static String SaveQueryEditorListener_cri_editor;
+
public static String SaveQueryEditorListener_Composite_Change_Name;
public static String SaveQueryEditorListener_Change_Name;
+
+ public static String SaveQueryEditorListener_refactoringTitle;
public static String SaveQueryEditorListener_replaceQuestion;
@@ -30,7 +36,7 @@
public static String SaveQueryEditorListener_replaceQuestion_confirm;
- public static String SaveQueryEditorListener_replaceTitle_confirm;
+ public static String SaveQueryEditorListener_replaceTitle_info;
public static String CriteriaQuickAssistProcessor_errorMessage;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.properties 2008-04-15 11:01:35 UTC (rev 7530)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.properties 2008-04-15 12:57:49 UTC (rev 7531)
@@ -12,11 +12,14 @@
SaveQueryEditorListener_replaceQuestion= Do you want to replace old query ''{0}'' in the {1} editor with new one ''{2}'' ?
SaveQueryEditorListener_replaceTitle= Query replace
-SaveQueryEditorListener_Change_Name=Update Query
-SaveQueryEditorListener_Composite_Change_Name=File Update
+SaveQueryEditorListener_hql_editor=HQL
+SaveQueryEditorListener_cri_editor=Criteria
+SaveQueryEditorListener_Change_Name=Update {0} query in ''{1}''
+SaveQueryEditorListener_Composite_Change_Name=Update {0} query
+SaveQueryEditorListener_refactoringTitle= Update {0} query in file
-SaveQueryEditorListener_replaceTitle_confirm= Query replace
-SaveQueryEditorListener_replaceQuestion_confirm= Query ''{0}'' changed it place in the {1} editor. Impossible to replace.
+SaveQueryEditorListener_replaceTitle_info= Query replace
+SaveQueryEditorListener_replaceQuestion_confirm= ''{0}'' was changed. It is not possible to update the query.
CriteriaQuickAssistProcessor_errorMessage= Could not get document contents for CriteriaQuickAssist
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java 2008-04-15 11:01:35 UTC (rev 7530)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java 2008-04-15 12:57:49 UTC (rev 7531)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.hibernate.eclipse.jdt.ui.internal;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
@@ -36,10 +35,12 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.TextFileDocumentProvider;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
import org.hibernate.eclipse.console.AbstractQueryEditor;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.hqleditor.HQLEditor;
/**
* @author Dmitry Geraskov
@@ -104,8 +105,6 @@
*/
public void propertyChanged(Object source, int propId) {
- String editorTitle = fromEditorPart.getTitle();
-
if (IEditorPart.PROP_DIRTY == propId && !editor.isDirty()){
IDocumentProvider docProvider = fromEditorPart.getDocumentProvider();
@@ -119,15 +118,22 @@
//document changed and we can get the exception
}
+ final String editorTitle = fromEditorPart.getTitle();
+
+ final String editor_name = editor instanceof HQLEditor
+ ? JdtUIMessages.SaveQueryEditorListener_hql_editor
+ : JdtUIMessages.SaveQueryEditorListener_cri_editor;
+
if (isDocChanged){
- String confirm_changed = NLS.bind(JdtUIMessages.SaveQueryEditorListener_replaceQuestion_confirm, query, editorTitle);
- MessageDialog.openConfirm( null, JdtUIMessages.SaveQueryEditorListener_replaceTitle_confirm, confirm_changed);
+ String information_message = NLS.bind(JdtUIMessages.SaveQueryEditorListener_replaceQuestion_confirm, editorTitle);
+ MessageDialog.openInformation(null, JdtUIMessages.SaveQueryEditorListener_replaceTitle_info, information_message);
return;
}
String newQuery = editor.getQueryString();
- final DocumentChange change = new DocumentChange(JdtUIMessages.SaveQueryEditorListener_Change_Name, doc);
+ String change_name = NLS.bind(JdtUIMessages.SaveQueryEditorListener_Change_Name, editor_name, editorTitle);
+ final DocumentChange change = new DocumentChange(change_name, doc);
TextEdit replaceEdit = new ReplaceEdit(position.x, position.y, newQuery);
change.setEdit(replaceEdit);
@@ -135,22 +141,21 @@
@Override
public RefactoringStatus checkFinalConditions(
- IProgressMonitor pm) throws CoreException,
- OperationCanceledException {
+ IProgressMonitor pm) throws OperationCanceledException {
return RefactoringStatus.create(Status.OK_STATUS);
}
@Override
public RefactoringStatus checkInitialConditions(
- IProgressMonitor pm) throws CoreException,
- OperationCanceledException {
+ IProgressMonitor pm) throws OperationCanceledException {
return RefactoringStatus.create(Status.OK_STATUS);
}
@Override
public Change createChange(IProgressMonitor pm)
- throws CoreException, OperationCanceledException {
- CompositeChange cc = new CompositeChange(JdtUIMessages.SaveQueryEditorListener_Composite_Change_Name);
+ throws OperationCanceledException {
+ String cc_name = NLS.bind(JdtUIMessages.SaveQueryEditorListener_Composite_Change_Name, editor_name);
+ CompositeChange cc = new CompositeChange(cc_name);
cc.add(change);
return cc;
}
@@ -165,13 +170,20 @@
@Override
protected void addUserInputPages() {}
};
-
+
+ String wizard_title = NLS.bind(JdtUIMessages.SaveQueryEditorListener_refactoringTitle, editor_name);
+ wizard.setWindowTitle(wizard_title);
+
IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
try {
- if ( new RefactoringStarter().activate(ref, wizard, win.getShell(), "", RefactoringSaveHelper.SAVE_ALL)){ //$NON-NLS-1$
+ if ( new RefactoringStarter().activate(ref, wizard, win.getShell(), wizard_title, RefactoringSaveHelper.SAVE_ALL)){ //$NON-NLS-1$
query = newQuery;
position.y = query.length();
fromEditorPart.doSave(null);
+ } else {
+ if (editor.getDocumentProvider() instanceof TextFileDocumentProvider){
+ ((TextFileDocumentProvider)editor.getDocumentProvider()).setCanSaveDocument(editor.getEditorInput());
+ }
}
} catch (JavaModelException e) {
HibernateConsolePlugin.getDefault().log(e);
18 years
JBoss Tools SVN: r7530 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-04-15 07:01:35 -0400 (Tue, 15 Apr 2008)
New Revision: 7530
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1960, retrieving url path from external css files links has been fixed.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-04-15 08:08:40 UTC (rev 7529)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-04-15 11:01:35 UTC (rev 7530)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.ILocationProvider;
@@ -23,30 +24,31 @@
public class VpeStyleUtil {
- public static final String ATTRIBUTE_STYLE = "style";
+ public static final String ATTRIBUTE_STYLE = "style"; //$NON-NLS-1$
- public static final String PARAMETER_POSITION = "position";
- public static final String PARAMETER_TOP = "top";
- public static final String PARAMETER_LEFT = "left";
- public static final String PARAMETER_WIDTH = "width";
- public static final String PARAMETER_HEIGHT = "height";
- public static final String PARAMETR_BACKGROND = "background";
+ public static final String PARAMETER_POSITION = "position"; //$NON-NLS-1$
+ public static final String PARAMETER_TOP = "top"; //$NON-NLS-1$
+ public static final String PARAMETER_LEFT = "left"; //$NON-NLS-1$
+ public static final String PARAMETER_WIDTH = "width"; //$NON-NLS-1$
+ public static final String PARAMETER_HEIGHT = "height"; //$NON-NLS-1$
+ public static final String PARAMETR_BACKGROND = "background"; //$NON-NLS-1$
- public static final String VALUE_ABSOLUTE = "absolute";
+ public static final String VALUE_ABSOLUTE = "absolute"; //$NON-NLS-1$
- public static final String DOT_STRING = ".";
- public static final String COLON_STRING = ":";
- public static final String SEMICOLON_STRING = ";";
- public static final String PX_STRING = "px";
- public static final String SPACE_STRING = " ";
- public static final String EMPTY_STRING = "";
+ public static final String DOT_STRING = "."; //$NON-NLS-1$
+ public static final String COLON_STRING = ":"; //$NON-NLS-1$
+ public static final String SEMICOLON_STRING = ";"; //$NON-NLS-1$
+ public static final String PX_STRING = "px"; //$NON-NLS-1$
+ public static final String SPACE_STRING = " "; //$NON-NLS-1$
+ public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ public static final String SINGLE_QUOTE_STRING = "\'"; //$NON-NLS-1$
- public static String ATTR_URL = "url";
- public static String OPEN_BRACKET = "(";
- public static String CLOSE_BRACKET = ")";
- public static String FILE_PRTOCOL = "file://";
- public static String FILE_STR = "file:";
- public static String FILE_SEPARAROT = "/";
+ public static String ATTR_URL = "url"; //$NON-NLS-1$
+ public static String OPEN_BRACKET = "("; //$NON-NLS-1$
+ public static String CLOSE_BRACKET = ")"; //$NON-NLS-1$
+ public static String FILE_PRTOCOL = "file://"; //$NON-NLS-1$
+ public static String FILE_STR = "file:"; //$NON-NLS-1$
+ public static String FILE_SEPARATOR = "/"; //$NON-NLS-1$
// sets parameter position in atribute style to absolute value
public static void setAbsolute(Element sourceElement) {
@@ -290,11 +292,13 @@
public static String addFullPathIntoBackgroundValue(String value,
IEditorInput input) {
- if (value.indexOf(FILE_STR) != -1)
- return value;
+ if (value.indexOf(FILE_STR) != -1) {
+ return value;
+ }
- if (!new File(value).isAbsolute())
- value = getFilePath(input, value);
+ if (!new File(value).isAbsolute()) {
+ value = getFilePath(input, value);
+ }
value = FILE_PRTOCOL + value;
URL url = null;
@@ -316,67 +320,84 @@
* @return format style string
*/
public static String addFullPathIntoURLValue(String value,
- IEditorInput input) {
+ IEditorInput input) {
- String urls[] = value.split(ATTR_URL);
+ String urls[] = value.split(ATTR_URL);
- if (urls.length == 1)
- return value;
+ if (urls.length == 1) {
+ return value;
+ }
- String finalStr = EMPTY_STRING;
- for (int i = 1; i < urls.length; i++) {
+ String finalStr = EMPTY_STRING;
+ for (int i = 1; i < urls.length; i++) {
- urls[i] = urls[i].replace("\'", EMPTY_STRING);
- urls[i] = ATTR_URL + urls[i];
+ urls[i] = urls[i].replace(SINGLE_QUOTE_STRING, EMPTY_STRING);
+ urls[i] = ATTR_URL + urls[i];
- int startAttr = urls[i].indexOf(ATTR_URL);
+ int startAttr = urls[i].indexOf(ATTR_URL);
- int startPathIndex = urls[i].indexOf(OPEN_BRACKET, startAttr);
- int endPathIndex = urls[i].indexOf(CLOSE_BRACKET,
- startPathIndex + 1);
+ int startPathIndex = urls[i].indexOf(OPEN_BRACKET, startAttr);
+ int endPathIndex = urls[i].indexOf(CLOSE_BRACKET,
+ startPathIndex + 1);
- if (startPathIndex == -1 || endPathIndex == -1)
- continue;
+ if (startPathIndex == -1 || endPathIndex == -1) {
+ continue;
+ }
- String filePath = urls[i].substring(startPathIndex + 1,
- endPathIndex);
- if (filePath.indexOf(FILE_STR) != -1)
- continue;
+ String filePath = urls[i].substring(startPathIndex + 1,
+ endPathIndex);
+ if (filePath.indexOf(FILE_STR) != -1) {
+ continue;
+ }
- if (!new File(filePath).isAbsolute())
- filePath = getFilePath(input, filePath);
+ if (!new File(filePath).isAbsolute()) {
+ filePath = getFilePath(input, filePath);
+ }
- filePath = FILE_PRTOCOL + filePath;
- URL url = null;
- try {
- url = new URL(filePath);
- } catch (MalformedURLException e) {
- continue;
- }
- filePath = url.toString();
+ filePath = FILE_PRTOCOL + filePath;
+ URL url = null;
+ try {
+ url = new URL(filePath);
+ } catch (MalformedURLException e) {
+ continue;
+ }
+ filePath = url.toString();
- String firstPartValue = urls[i].substring(0, startPathIndex + 1);
- String secondPartValue = urls[i].substring(endPathIndex, urls[i]
- .length());
+ String firstPartValue = urls[i].substring(0, startPathIndex + 1);
+ String secondPartValue = urls[i].substring(endPathIndex, urls[i]
+ .length());
- urls[i] = firstPartValue + filePath + secondPartValue;
+ urls[i] = firstPartValue + filePath + secondPartValue;
+ }
+ for (int i = 0; i < urls.length; i++)
+ finalStr += urls[i];
+ return finalStr;
}
- for (int i = 0; i < urls.length; i++)
- finalStr += urls[i];
- return finalStr;
- }
/**
+ *
+ * @param nput
+ * The editor input
+ * @param fileName
+ * Relative path file
+ * @return Absolute path file
+ */
+ public static String getFilePath(IEditorInput input, String fileName) {
+ IPath inputPath = getInputParentPath(input);
+ return inputPath.toOSString() + File.separator + fileName;
+ }
+
+ /**
+ * Gets the file path.
*
- * @param nput
- * The editor input
- * @param fileName
- * Relative path file
- * @return Absolute path file
+ * @param href_val the href_val
+ * @param fileName the file name
+ *
+ * @return the file path
*/
- public static String getFilePath(IEditorInput input, String fileName) {
- IPath inputPath = getInputParentPath(input);
- return inputPath.toOSString() + File.separator + fileName;
+ public static String getFilePath(String href_val, String fileName) {
+ IPath inputPath = getInputParentPath(href_val);
+ return inputPath.toOSString() + File.separator + fileName;
}
/**
@@ -386,109 +407,94 @@
* @return Path
*/
public static IPath getInputParentPath(IEditorInput input) {
- IPath inputPath = null;
- if (input instanceof ILocationProvider) {
- inputPath = ((ILocationProvider) input).getPath(input);
- } else if (input instanceof IFileEditorInput) {
- IFile inputFile = ((IFileEditorInput) input).getFile();
- if (inputFile != null) {
- inputPath = inputFile.getLocation();
- }
+ IPath inputPath = null;
+ if (input instanceof ILocationProvider) {
+ inputPath = ((ILocationProvider) input).getPath(input);
+ } else if (input instanceof IFileEditorInput) {
+ IFile inputFile = ((IFileEditorInput) input).getFile();
+ if (inputFile != null) {
+ inputPath = inputFile.getLocation();
+ }
+ }
+ if (inputPath != null && !inputPath.isEmpty()) {
+ inputPath = inputPath.removeLastSegments(1);
+ }
+ return inputPath;
}
- if (inputPath != null && !inputPath.isEmpty()) {
- inputPath = inputPath.removeLastSegments(1);
- }
- return inputPath;
- }
/**
+ * Gets the href file path.
*
- * @param value
- * Css string
- * @param href_val
- * Path of css file
- * @return Format style string
+ * @param href_val the href_val
+ *
+ * @return href file path
*/
+ public static IPath getInputParentPath(String href_val) {
+ IPath inputPath = null;
+ inputPath = new Path(href_val);
+ if (inputPath != null && !inputPath.isEmpty()) {
+ /*
+ * Remove href trailing filename
+ */
+ inputPath = inputPath.removeLastSegments(1);
+ }
+ return inputPath;
+ }
+
+ /**
+ *
+ * @param value
+ * Css string
+ * @param href_val
+ * Path of css file
+ * @return Format style string
+ */
public static String addFullPathIntoURLValue(String value, String href_val) {
- String urls[] = value.split(ATTR_URL);
+ String urls[] = value.split(ATTR_URL);
+ if (urls.length == 1) {
+ return value;
+ }
- if (urls.length == 1)
- return value;
+ String finalStr = EMPTY_STRING;
+ for (int i = 1; i < urls.length; i++) {
+ urls[i] = urls[i].replace(SINGLE_QUOTE_STRING, EMPTY_STRING);
+ urls[i] = ATTR_URL + urls[i];
+ int startAttr = urls[i].indexOf(ATTR_URL);
+ int startPathIndex = urls[i].indexOf(OPEN_BRACKET, startAttr);
+ int endPathIndex = urls[i].indexOf(CLOSE_BRACKET,
+ startPathIndex + 1);
+ String filePath = urls[i].substring(startPathIndex + 1,
+ endPathIndex);
- String finalStr = EMPTY_STRING;
+ if (filePath.indexOf(FILE_STR) != -1) {
+ continue;
+ }
- for (int i = 1; i < urls.length; i++) {
+ if (!new File(filePath).isAbsolute()) {
+ filePath = getFilePath(href_val, filePath);
+ } else {
+ filePath = FILE_PRTOCOL + filePath;
+ }
- urls[i] = urls[i].replace("\'", EMPTY_STRING);
- urls[i] = ATTR_URL + urls[i];
+ URL url = null;
+ try {
+ url = new URL(filePath);
+ } catch (MalformedURLException e) {
+ continue;
+ }
+ filePath = url.toString();
- int startAttr = urls[i].indexOf(ATTR_URL);
+ String firstPartValue = urls[i].substring(0, startPathIndex + 1);
+ String secondPartValue = urls[i].substring(endPathIndex, urls[i]
+ .length());
- int startPathIndex = urls[i].indexOf(OPEN_BRACKET, startAttr);
- int endPathIndex = urls[i].indexOf(CLOSE_BRACKET,
- startPathIndex + 1);
-
- String filePath = urls[i].substring(startPathIndex + 1,
- endPathIndex);
- if (filePath.indexOf(FILE_STR) != -1)
- continue;
-
- if (!new File(filePath).isAbsolute())
- filePath = getAbsolutePathImage(filePath, href_val);
- else
- filePath = FILE_PRTOCOL + filePath;
-
- try {
- new URL(filePath);
- } catch (MalformedURLException e) {
- continue;
- }
-
- // Dzmitry Sakovich
- // Fix for Linux
- // filePath = url.toString();
-
- String firstPartValue = urls[i].substring(0, startPathIndex + 1);
- String secondPartValue = urls[i].substring(endPathIndex, urls[i]
- .length());
-
- urls[i] = firstPartValue + filePath + secondPartValue;
+ urls[i] = firstPartValue + filePath + secondPartValue;
+ }
+ for (int i = 0; i < urls.length; i++) {
+ finalStr += urls[i];
+ }
+ return finalStr;
}
- for (int i = 0; i < urls.length; i++)
- finalStr += urls[i];
- return finalStr;
- }
- /**
- *
- * @param pathImgRelative
- * Relative path img file
- * @param pathCssAbsolute
- * Absolute path css file
- * @return Absolute path img file
- */
- private static String getAbsolutePathImage(String pathImgRelative,
- String pathCssAbsolute) {
-
- int k = 0;
- int j = 0;
- try {
- new URL(pathCssAbsolute);
- } catch (MalformedURLException e) {
- return pathImgRelative;
- }
-
- // TODO Dzmitry Sakovich
- // Fix for Linux
- // pathCssAbsolute = url.toString();
-
- while (j != -1) {
- j = pathCssAbsolute.indexOf(FILE_SEPARAROT, j + 1);
- if (j == -1)
- break;
- k = j;
- }
- return pathCssAbsolute.substring(0, k + 1) + pathImgRelative;
- }
}
\ No newline at end of file
18 years
JBoss Tools SVN: r7529 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-04-15 04:08:40 -0400 (Tue, 15 Apr 2008)
New Revision: 7529
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java
Log:
JBIDE-1072
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java 2008-04-15 07:45:15 UTC (rev 7528)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java 2008-04-15 08:08:40 UTC (rev 7529)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.loaders.impl.SerializingLoader;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
@@ -79,8 +80,8 @@
}
try {
loadWebXML(body, location);
- } catch (Exception e) {
- WebModelPlugin.getPluginLog().logError(e);
+ } catch (XModelException e) {
+ //Do not log this exception. It will be shown in wizard.
webXMLErrorMessage = e.getMessage();
return;
}
@@ -88,7 +89,7 @@
try {
webInfLocation = webInfFile.getCanonicalPath().replace('\\', '/');
} catch (IOException e) {
- WebModelPlugin.getPluginLog().logError(e);
+ //Do not log this exception. It will be shown in wizard.
webXMLErrorMessage = e.getMessage();
return;
}
@@ -206,7 +207,7 @@
FileUtil.writeFile(f, text);
try {
IProject p = getProjectHandle();
- if(p.exists()) p.refreshLocal(IProject.DEPTH_INFINITE, null);
+ if(p.exists() && p.isAccessible()) p.refreshLocal(IProject.DEPTH_INFINITE, null);
} catch (CoreException e) {
WebModelPlugin.getPluginLog().logError(e);
}
18 years
JBoss Tools SVN: r7528 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-04-15 03:45:15 -0400 (Tue, 15 Apr 2008)
New Revision: 7528
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
Log:
JBIDE-2052
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2008-04-15 07:25:50 UTC (rev 7527)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2008-04-15 07:45:15 UTC (rev 7528)
@@ -416,7 +416,7 @@
public void setPrecedence(IValueInfo value) {
attributes.put(ISeamXmlComponentDeclaration.PRECEDENCE, value);
- String p = value.getValue();
+ String p = value == null ? null : value.getValue();
if(p == null) {
setPrecedence(0);
return;
18 years
JBoss Tools SVN: r7527 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-04-15 03:25:50 -0400 (Tue, 15 Apr 2008)
New Revision: 7527
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF
Log:
http://jira.jboss.com/jira/browse/JBIDE-2008
Compare dialog added
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF 2008-04-15 07:22:08 UTC (rev 7526)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF 2008-04-15 07:25:50 UTC (rev 7527)
@@ -17,7 +17,9 @@
org.eclipse.gef,
org.hibernate.eclipse,
org.hibernate.eclipse.console,
- org.eclipse.ui.editors
+ org.eclipse.ui.editors,
+ org.eclipse.ltk.core.refactoring,
+ org.eclipse.ltk.ui.refactoring
Eclipse-LazyStart: true
Export-Package: org.hibernate.eclipse.jdt.ui,
org.hibernate.eclipse.jdt.ui.internal
18 years
JBoss Tools SVN: r7526 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-04-15 03:22:08 -0400 (Tue, 15 Apr 2008)
New Revision: 7526
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2008
Compare dialog added
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.java 2008-04-15 01:25:29 UTC (rev 7525)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.java 2008-04-15 07:22:08 UTC (rev 7526)
@@ -20,6 +20,10 @@
private static final String BUNDLE_NAME= "org.hibernate.eclipse.jdt.ui.internal.JdtUIMessages";//$NON-NLS-1$
+ public static String SaveQueryEditorListener_Composite_Change_Name;
+
+ public static String SaveQueryEditorListener_Change_Name;
+
public static String SaveQueryEditorListener_replaceQuestion;
public static String SaveQueryEditorListener_replaceTitle;
@@ -34,8 +38,8 @@
public static String HQLJavaCompletionProposalComputer_errorMessage;
+ public static String SaveQueryEditorListener_errorMessage;
-
static {
NLS.initializeMessages(BUNDLE_NAME, JdtUIMessages.class);
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.properties 2008-04-15 01:25:29 UTC (rev 7525)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUIMessages.properties 2008-04-15 07:22:08 UTC (rev 7526)
@@ -12,6 +12,8 @@
SaveQueryEditorListener_replaceQuestion= Do you want to replace old query ''{0}'' in the {1} editor with new one ''{2}'' ?
SaveQueryEditorListener_replaceTitle= Query replace
+SaveQueryEditorListener_Change_Name=Update Query
+SaveQueryEditorListener_Composite_Change_Name=File Update
SaveQueryEditorListener_replaceTitle_confirm= Query replace
SaveQueryEditorListener_replaceQuestion_confirm= Query ''{0}'' changed it place in the {1} editor. Impossible to replace.
@@ -20,4 +22,5 @@
DebugJavaCompletionProposalComputer_displayString= I wanna show a dialog!
-HQLJavaCompletionProposalComputer_errorMessage= Error while performing HQL completion in java
\ No newline at end of file
+HQLJavaCompletionProposalComputer_errorMessage= Error while performing HQL completion in java
+SaveQueryEditorListener_errorMessage=Error while query refactoring
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java 2008-04-15 01:25:29 UTC (rev 7525)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java 2008-04-15 07:22:08 UTC (rev 7526)
@@ -10,24 +10,36 @@
******************************************************************************/
package org.hibernate.eclipse.jdt.ui.internal;
-import org.eclipse.jdt.internal.ui.dialogs.OptionalMessageDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.ui.refactoring.RefactoringSaveHelper;
+import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.window.Window;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.DocumentChange;
+import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Point;
+import org.eclipse.text.edits.ReplaceEdit;
+import org.eclipse.text.edits.TextEdit;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
import org.hibernate.eclipse.console.AbstractQueryEditor;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
-import org.hibernate.eclipse.jdt.ui.Activator;
/**
* @author Dmitry Geraskov
@@ -74,8 +86,8 @@
if (fromWorkbenchPart == part){
fromEditorPart.getEditorSite().getPage().removePartListener(this);
editor.removePropertyListener(SaveQueryEditorListener.this);
- editor.showDisconnected();
- }
+ editor.showDisconnected();
+ }
}
public void partDeactivated(IWorkbenchPart part) {}
@@ -114,29 +126,54 @@
}
String newQuery = editor.getQueryString();
- String question = NLS.bind(JdtUIMessages.SaveQueryEditorListener_replaceQuestion, new String[]{query, editorTitle, newQuery});
+
+ final DocumentChange change = new DocumentChange(JdtUIMessages.SaveQueryEditorListener_Change_Name, doc);
+ TextEdit replaceEdit = new ReplaceEdit(position.x, position.y, newQuery);
+ change.setEdit(replaceEdit);
+
+ Refactoring ref = new Refactoring(){
- int ans = OptionalMessageDialog.open(id, null, JdtUIMessages.SaveQueryEditorListener_replaceTitle, null, question,
- MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0);
- if (OptionalMessageDialog.NOT_SHOWN != ans){
- //write previous answer
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- store.setValue(id, ans == Window.OK);
- } else {
- //read previous answer
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- if (!store.getBoolean(id)) return;
- }
- if (Window.CANCEL == ans){
- return;
- }
+ @Override
+ public RefactoringStatus checkFinalConditions(
+ IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ return RefactoringStatus.create(Status.OK_STATUS);
+ }
+
+ @Override
+ public RefactoringStatus checkInitialConditions(
+ IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ return RefactoringStatus.create(Status.OK_STATUS);
+ }
+
+ @Override
+ public Change createChange(IProgressMonitor pm)
+ throws CoreException, OperationCanceledException {
+ CompositeChange cc = new CompositeChange(JdtUIMessages.SaveQueryEditorListener_Composite_Change_Name);
+ cc.add(change);
+ return cc;
+ }
+
+ @Override
+ public String getName() {
+ return JdtUIMessages.SaveQueryEditorListener_Composite_Change_Name;
+ }
+ };
+ RefactoringWizard wizard = new RefactoringWizard(ref, RefactoringWizard.WIZARD_BASED_USER_INTERFACE){
+ @Override
+ protected void addUserInputPages() {}
+ };
+
+ IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
try {
- // replace old string with new one and change positions
- doc.replace(position.x, position.y, newQuery);
- position.y = newQuery.length();
- query = newQuery;
- } catch (BadLocationException e) {
+ if ( new RefactoringStarter().activate(ref, wizard, win.getShell(), "", RefactoringSaveHelper.SAVE_ALL)){ //$NON-NLS-1$
+ query = newQuery;
+ position.y = query.length();
+ fromEditorPart.doSave(null);
+ }
+ } catch (JavaModelException e) {
HibernateConsolePlugin.getDefault().log(e);
}
}
18 years
JBoss Tools SVN: r7525 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-04-14 21:25:29 -0400 (Mon, 14 Apr 2008)
New Revision: 7525
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
Log:
JBIDE-2055 hotkeys to "jump" between source and visual part of split vpe editor
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2008-04-14 17:43:36 UTC (rev 7524)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2008-04-15 01:25:29 UTC (rev 7525)
@@ -1,2 +1,7 @@
providerName=Red Hat, Inc.
pluginName=JBoss Tools UI Plugin
+vpe.editor.binding.context.description=The Visual Page Editor
+editor.binding.context.name=Visual Page Editor
+vpe.category=Visual Page Editor
+source.maxmin=Maximize/Restore Source Part
+visual.maxmin=Maximize/Restore Visual Part
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-04-14 17:43:36 UTC (rev 7524)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-04-15 01:25:29 UTC (rev 7525)
@@ -33,5 +33,33 @@
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page category="org.jboss.tools.common.xstudio.editors" class="org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage" id="org.jboss.tools.vpe.editor" name="Visual Page Editor"></page>
- </extension>
+ </extension>
+ <extension
+ point="org.eclipse.ui.contexts">
+ <context
+ description="%vpe.editor.binding.context.description"
+ id="org.jboss.tools.vpe.editorContext"
+ name="%editor.binding.context.name"
+ parentId="org.eclipse.ui.textEditorScope">
+ </context>
+ </extension>
+ <extension id="org.jboss.tools.vpe.commands" point="org.eclipse.ui.commands">
+ <category id="org.jboss.tools.vpe.category" name="%vpe.category"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.source.maxmin"
+ name="%source.maxmin"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.visual.maxmin"
+ name="%visual.maxmin"/>
+ </extension>
+ <extension point="org.eclipse.ui.bindings">
+ <key commandId="org.jboss.tools.vpe.source.maxmin"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.jboss.tools.vpe.editorContext"
+ sequence="M1+F6"/>
+ <key commandId="org.jboss.tools.vpe.visual.maxmin"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.jboss.tools.vpe.editorContext"
+ sequence="M1+M2+F6"/>
+ </extension>
</plugin>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-04-14 17:43:36 UTC (rev 7524)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-04-15 01:25:29 UTC (rev 7525)
@@ -13,6 +13,10 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.QualifiedName;
@@ -43,11 +47,16 @@
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IReusableEditor;
import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartConstants;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextActivation;
+import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.handlers.IHandlerActivation;
+import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
@@ -75,6 +84,9 @@
public class VpeEditorPart extends EditorPart implements ITextEditor,
ITextEditorExtension, IReusableEditor, IVisualEditor {
+ private IContextActivation fContextActivation;
+ private IHandlerActivation sourceActivation,visualActivation;
+ private IHandler sourceMaxmin,visualMaxmin;
private CustomSashForm container;
protected EditorSettings editorSettings;
private StructuredTextEditor sourceEditor = null;
@@ -652,6 +664,30 @@
// ///////////////////////////////////////
cmpEd.layout();
+ sourceMaxmin = new AbstractHandler() {
+ public Object execute(ExecutionEvent event)
+ throws ExecutionException {
+ Point p = visualContent.getSize();
+ if (p.x == 0 || p.y == 0) {
+ container.upClicked();
+ } else {
+ container.maxDown();
+ }
+ return null;
+ }
+ };
+ visualMaxmin = new AbstractHandler() {
+ public Object execute(ExecutionEvent event)
+ throws ExecutionException {
+ Point p = sourceContent.getSize();
+ if (p.x == 0 || p.y == 0) {
+ container.downClicked();
+ } else {
+ container.maxUp();
+ }
+ return null;
+ }
+ };
}
public void createVisualEditor() {
@@ -761,6 +797,9 @@
private class ActivationListener extends ShellAdapter implements
IPartListener {
+ private static final String VPE_EDITOR_CONTEXT = "org.jboss.tools.vpe.editorContext";
+ private static final String VPE_VISUAL_MAXMIN = "org.jboss.tools.vpe.visual.maxmin";
+ private static final String VPE_SOURCE_MAXMIN = "org.jboss.tools.vpe.source.maxmin";
private IWorkbenchPart fActivePart;
private boolean fIsHandlingActivation = false;
@@ -777,6 +816,21 @@
public void partDeactivated(IWorkbenchPart part) {
fActivePart = null;
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ if (fContextActivation != null) {
+ IContextService contextService = (IContextService) workbench
+ .getAdapter(IContextService.class);
+ contextService.deactivateContext(fContextActivation);
+ }
+
+ IHandlerService handlerService = (IHandlerService) workbench
+ .getService(IHandlerService.class);
+ if (handlerService != null) {
+ if (sourceActivation != null)
+ handlerService.deactivateHandler(sourceActivation);
+ if (visualActivation != null)
+ handlerService.deactivateHandler(visualActivation);
+ }
}
public void partOpened(IWorkbenchPart part) {
@@ -804,6 +858,21 @@
}
sourceEditor.safelySanityCheckState(getEditorInput());
}
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IContextService contextService = (IContextService) workbench
+ .getAdapter(IContextService.class);
+ fContextActivation = contextService
+ .activateContext(VPE_EDITOR_CONTEXT); //$NON-NLS-1$
+ IHandlerService handlerService = (IHandlerService) workbench
+ .getService(IHandlerService.class);
+ if (handlerService != null) {
+ sourceActivation = handlerService.activateHandler(
+ VPE_SOURCE_MAXMIN,
+ sourceMaxmin);
+ visualActivation = handlerService.activateHandler(
+ VPE_VISUAL_MAXMIN,
+ visualMaxmin);
+ }
} finally {
fIsHandlingActivation = false;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2008-04-14 17:43:36 UTC (rev 7524)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2008-04-15 01:25:29 UTC (rev 7525)
@@ -177,6 +177,14 @@
}
+ public void upClicked() {
+ upClicked(currentSashInfo);
+ }
+
+ public void downClicked() {
+ downClicked(currentSashInfo);
+ }
+
/**
* Call to set to max down
*/
18 years
JBoss Tools SVN: r7524 - trunk/documentation/qa/reports/Regression11.04.08.
by jbosstools-commits@lists.jboss.org
Author: aklimkovich
Date: 2008-04-14 13:43:36 -0400 (Mon, 14 Apr 2008)
New Revision: 7524
Added:
trunk/documentation/qa/reports/Regression11.04.08/Seam and TestNG.htm
Log:
Added a file remotely
Added: trunk/documentation/qa/reports/Regression11.04.08/Seam and TestNG.htm
===================================================================
--- trunk/documentation/qa/reports/Regression11.04.08/Seam and TestNG.htm (rev 0)
+++ trunk/documentation/qa/reports/Regression11.04.08/Seam and TestNG.htm 2008-04-14 17:43:36 UTC (rev 7524)
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD><TITLE>Execution Report</TITLE>
+<STYLE>H1 {
+ COLOR: #4a5d75; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+H2 {
+ COLOR: #4a5d75; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+TR {
+ BACKGROUND-COLOR: #f5f5f5
+}
+TD {
+ BORDER-RIGHT: dimgray 1px solid; PADDING-RIGHT: 0.5em; BORDER-TOP: dimgray 1px solid; PADDING-LEFT: 0.5em; PADDING-BOTTOM: 0.15em; BORDER-LEFT: dimgray 1px solid; PADDING-TOP: 0.15em; BORDER-BOTTOM: dimgray 1px solid; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+HR {
+ COLOR: #999; BORDER-COLLAPSE: collapse
+}
+BODY {
+ PADDING-RIGHT: 2em; PADDING-LEFT: 2em; FONT-SIZE: 12px; PADDING-BOTTOM: 0em; COLOR: #333; LINE-HEIGHT: 100%; PADDING-TOP: 0em; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; max-width: 55em
+}
+TABLE {
+ BORDER-RIGHT: dimgray 0px solid; BORDER-TOP: dimgray 0px solid; BORDER-LEFT: dimgray 0px solid; COLOR: #4a5d75; BORDER-BOTTOM: dimgray 0px solid; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif
+}
+</STYLE>
+
+<META http-equiv=Content-Type content="text/html; charset=ISO-8859-5">
+<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
+<BODY bgColor=#f5f5f5>
+<CENTER>
+<H1>Seam and TestNG</H1>
+<TABLE
+style="BORDER-TOP-WIDTH: 1pt; BORDER-LEFT-WIDTH: 1pt; BORDER-BOTTOM-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"
+cellSpacing=0 cellPadding=4 width="100%" align=center>
+ <TBODY>
+ <TR bgColor=gray>
+ <TD><B>Exec Date</B></TD>
+ <TD><B>Plan: Test Name</B></TD>
+ <TD><B>Status</B></TD>
+ <TD><B>Bug Number</B></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">14.04.2008</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">05 Running
+ Test NG suite runtime 1.2</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">14.04.2008</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">03 Creating
+ test Action runtime 1.2</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">14.04.2008</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">07 Checking
+ generated Test report runtime 1.2</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">14.04.2008</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">01 Creating
+ Seam Web ear project</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">14.04.2008</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">02 Creating
+ Seam 2.0 Web ear project</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">14.04.2008</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">04 Creating
+ test Action runtime 2.0</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">14.04.2008</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">06 Running
+ Test NG suite runtime 2.0</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: red; BORDER-RIGHT-WIDTH: 1pt">Failed</TD>
+ <TD
+style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">JBIDE-2051</TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">14.04.2008</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">08 Checking
+ generated Test report runtime 2.0</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: red; BORDER-RIGHT-WIDTH: 1pt">Failed</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">JBIDE-2051</TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
18 years