JBoss Tools SVN: r6917 - tags/jbosstools-2.0.1.GA.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2008-03-13 15:46:02 -0400 (Thu, 13 Mar 2008)
New Revision: 6917
Removed:
tags/jbosstools-2.0.1.GA/seam/
Log:
retagging seam for 2.0.1
16 years, 3 months
JBoss Tools SVN: r6916 - in branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: widget/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-03-13 14:05:02 -0400 (Thu, 13 Mar 2008)
New Revision: 6916
Modified:
branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1786
compatibility level have changed from minor to major version:
1. If major versions selected and extracted from archive don't match, dialog shows error
2. if major versions match but minor doesn't, dialog shows warning
So if you select seam-2.1.0.A1 dialog shows a warning but if you select seam-3.0.0 or 1.2.1 error is shown.
Modified: branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-03-13 17:55:14 UTC (rev 6915)
+++ branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-03-13 18:05:02 UTC (rev 6916)
@@ -685,12 +685,14 @@
final String deploymentType = value.toString();
if(!ISeamFacetDataModelProperties.DEPLOY_AS_WAR.equals(deploymentType)) {
- String runtimeName = model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME).toString();
- IRuntime rt = RuntimeManager.getRuntime(runtimeName);
- if(!rt.supports(EJB_30) || !rt.supports(EAR_50)) {
- return ValidatorFactory.createErrormessage(
- propertyName,
- NLS.bind(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CANNOT_USE_SELECTED_DEPLOYMENT6 , new String[]{deploymentType.toUpperCase(),runtimeName}));
+ Object runtimeName = model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME);
+ if(runtimeName!=null) {
+ IRuntime rt = RuntimeManager.getRuntime(runtimeName.toString());
+ if(!rt.supports(EJB_30) || !rt.supports(EAR_50)) {
+ return ValidatorFactory.createErrormessage(
+ propertyName,
+ NLS.bind(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CANNOT_USE_SELECTED_DEPLOYMENT6 , new String[]{deploymentType.toUpperCase(),runtimeName.toString()}));
+ }
}
}
return ValidatorFactory.NO_ERRORS;
Modified: branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
===================================================================
--- branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2008-03-13 17:55:14 UTC (rev 6915)
+++ branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2008-03-13 18:05:02 UTC (rev 6916)
@@ -151,7 +151,7 @@
}
String version = (String) context;
- if(version.startsWith("2.0")) { //$NON-NLS-1$
+ if(version.startsWith("2.")) { //$NON-NLS-1$
File seamJarFile = new File(value.toString(), "lib/jboss-seam.jar"); //$NON-NLS-1$
if (!seamJarFile.isFile()) {
errors = createErrorMap();
Modified: branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
--- branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2008-03-13 17:55:14 UTC (rev 6915)
+++ branches/jbosstools-2.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2008-03-13 18:05:02 UTC (rev 6916)
@@ -28,6 +28,7 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
@@ -539,9 +540,7 @@
}
if (seamVersion != null && validSeamVersions != null) {
for (SeamVersion ver : validSeamVersions) {
- if (seamVersion.matches(ver.toString().replace(".",
- "\\.")
- + ".*")) {
+ if (seamVersion.matches(ver.toString().substring(0,1)+ ".*")) {
version.setValue(ver.toString());
break;
}
@@ -599,15 +598,23 @@
setPageComplete(false);
return;
} else if ("".equals(seamVersion)) { //$NON-NLS-1$
- setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER);
- setPageComplete(false);
+ setMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER,
+ IMessageProvider.WARNING);
+ setPageComplete(true);
return;
} else if (!seamVersion.matches(version.getValueAsString().replace(
".", "\\.") + ".*")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
- + seamVersion + "'"); //$NON-NLS-1$
- setPageComplete(false);
- return;
+ if(seamVersion.matches(version.getValueAsString().substring(0,1)+".*")) {
+ setMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
+ + seamVersion + "'", IMessageProvider.WARNING); //$NON-NLS-1$
+ } else {
+ setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
+ + seamVersion + "'"); //$NON-NLS-1$
+ setPageComplete(false);
+ return;
+ }
+ } else {
+ setMessage(null);
}
Map errors = ValidatorFactory.JBOSS_SEAM_HOME_FOLDER_VALIDATOR
16 years, 3 months
JBoss Tools SVN: r6915 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui/actions and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-03-13 13:55:14 -0400 (Thu, 13 Mar 2008)
New Revision: 6915
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/icons/find_seam_declarations.gif
trunk/seam/plugins/org.jboss.tools.seam.ui/icons/find_seam_references.gif
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1860 Seam find references is not using the right extensionpoint/shortcut
Ctrl-G/Ctrl-Shift-G Seam Find actions are moved to Ctrl-1 quick fix dialog for the Java Editor.
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/icons/find_seam_declarations.gif
===================================================================
(Binary files differ)
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/icons/find_seam_declarations.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/icons/find_seam_references.gif
===================================================================
(Binary files differ)
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/icons/find_seam_references.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java 2008-03-13 17:35:34 UTC (rev 6914)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java 2008-03-13 17:55:14 UTC (rev 6915)
@@ -4,7 +4,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.text.java.IInvocationContext;
@@ -20,11 +19,10 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.ui.part.FileEditorInput;
-import org.hibernate.console.ImageConstants;
-import org.hibernate.eclipse.console.HibernateConsolePlugin;
-import org.hibernate.eclipse.console.utils.EclipseImages;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
+import org.jboss.tools.seam.ui.SeamUiImages;
public class SeamFindQuickAssistProcessor implements IQuickAssistProcessor {
@@ -55,19 +53,19 @@
String contents = document.get( context.getSelectionOffset(), context.getSelectionLength() );
result = new IJavaCompletionProposal[2];
- result[0] = new ExternalActionQuickAssistProposal(contents, EclipseImages.getImage(ImageConstants.CRITERIA_EDITOR), "Find Seam Declarations", context) {
+ result[0] = new ExternalActionQuickAssistProposal(contents, SeamUiImages.getImage("find_seam_declarations.gif"), "Find Seam Declarations", context) {
public void apply(IDocument target) {
new FindSeamDeclarationsAction().run();
}
};
- result[1] = new ExternalActionQuickAssistProposal(contents, EclipseImages.getImage(ImageConstants.CRITERIA_EDITOR), "Find Seam References", context) {
+ result[1] = new ExternalActionQuickAssistProposal(contents, SeamUiImages.getImage("find_seam_references.gif"), "Find Seam References", context) {
public void apply(IDocument target) {
new FindSeamReferencesAction().run();
}
};
}
catch (BadLocationException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage( "Could not get document contents for CriteriaQuickAssist", e );
+ SeamGuiPlugin.getPluginLog().logError( "Could not get document contents for Seam Find Quick Assist", e );
}
return result;
}
16 years, 3 months
JBoss Tools SVN: r6914 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui/actions and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-03-13 13:35:34 -0400 (Thu, 13 Mar 2008)
New Revision: 6914
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1860 Seam find references is not using the right extensionpoint/shortcut
Ctrl-G/Ctrl-Shift-G Seam Find actions are moved to Ctrl-1 quick fix dialog for the Java Editor.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-03-13 15:28:37 UTC (rev 6913)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-03-13 17:35:34 UTC (rev 6914)
@@ -480,13 +480,13 @@
</command>
<command
categoryId="org.eclipse.ui.category.navigate"
- description="Find Declarations"
+ description="Find Seam Declarations"
id="org.jboss.tools.seam.ui.find.declarations"
name="Find Seam Declarations">
</command>
<command
categoryId="org.eclipse.ui.category.navigate"
- description="Find References"
+ description="Find Seam References"
id="org.jboss.tools.seam.ui.find.references"
name="Find Seam References">
</command>
@@ -498,7 +498,7 @@
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+M2+Z">
</key>
- <key
+ <!-- key
commandId="org.jboss.tools.seam.ui.find.declarations"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+G">
@@ -507,7 +507,7 @@
commandId="org.jboss.tools.seam.ui.find.references"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+M2+G">
- </key>
+ </key -->
</extension>
<extension
@@ -519,4 +519,24 @@
class="org.jboss.tools.seam.ui.search.SeamSearchResultPage">
</viewPage>
</extension>
+
+ <extension
+ point="org.eclipse.jdt.ui.quickAssistProcessors">
+ <quickAssistProcessor
+ class="org.jboss.tools.seam.ui.actions.SeamFindQuickAssistProcessor"
+ id="org.jboss.tools.seam.ui.seamfindquickassist"
+ name="Seam Find"/>
+ </extension>
+
+ <!--======================================================================================-->
+ <!-- queryParticipant to participate in java seraches -->
+ <!--======================================================================================-->
+ <!-- extension point="org.eclipse.jdt.ui.queryParticipants">
+ <queryParticipant
+ name="Seam Query Participant"
+ nature="org.eclipse.jdt.core.javanature"
+ class="org.jboss.tools.seam.ui.search.SeamQueryParticipant"
+ id="org.jboss.tools.seam.ui.search.SeamQueryParticipant" />
+ </extension -->
+
</plugin>
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java 2008-03-13 17:35:34 UTC (rev 6914)
@@ -0,0 +1,131 @@
+package org.jboss.tools.seam.ui.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jdt.ui.text.java.IInvocationContext;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+import org.eclipse.jdt.ui.text.java.IProblemLocation;
+import org.eclipse.jdt.ui.text.java.IQuickAssistProcessor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.part.FileEditorInput;
+import org.hibernate.console.ImageConstants;
+import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.console.utils.EclipseImages;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.core.SeamCorePlugin;
+
+public class SeamFindQuickAssistProcessor implements IQuickAssistProcessor {
+
+ public SeamFindQuickAssistProcessor() {
+ }
+
+ public boolean hasAssists(IInvocationContext context) throws CoreException {
+ ICompilationUnit cu = context.getCompilationUnit();
+ if (cu == null)
+ return false;
+
+ IResource javaFile = cu.getResource();
+ if (javaFile == null)
+ return false;
+
+ ISeamProject seamProject = SeamCorePlugin.getSeamProject(javaFile.getProject(), true);
+ return (seamProject!=null);
+ }
+
+ public IJavaCompletionProposal[] getAssists(IInvocationContext context,
+ IProblemLocation[] locations) throws CoreException {
+
+ IJavaCompletionProposal[] result = new IJavaCompletionProposal[0];
+ if(!hasAssists( context )) return result;
+
+ IDocument document = getDocument( context.getCompilationUnit() );
+ try {
+ String contents = document.get( context.getSelectionOffset(), context.getSelectionLength() );
+ result = new IJavaCompletionProposal[2];
+
+ result[0] = new ExternalActionQuickAssistProposal(contents, EclipseImages.getImage(ImageConstants.CRITERIA_EDITOR), "Find Seam Declarations", context) {
+ public void apply(IDocument target) {
+ new FindSeamDeclarationsAction().run();
+ }
+ };
+ result[1] = new ExternalActionQuickAssistProposal(contents, EclipseImages.getImage(ImageConstants.CRITERIA_EDITOR), "Find Seam References", context) {
+ public void apply(IDocument target) {
+ new FindSeamReferencesAction().run();
+ }
+ };
+ }
+ catch (BadLocationException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage( "Could not get document contents for CriteriaQuickAssist", e );
+ }
+ return result;
+ }
+
+ private IDocument getDocument(ICompilationUnit cu) throws JavaModelException {
+ IFile file= (IFile) cu.getResource();
+ IDocument document= JavaUI.getDocumentProvider().getDocument(new FileEditorInput(file));
+ if (document == null) {
+ return new Document(cu.getSource()); // only used by test cases
+ }
+ return document;
+ }
+
+ public abstract class ExternalActionQuickAssistProposal implements
+ IJavaCompletionProposal {
+
+ private String contents;
+ private ICompletionProposal proposal;
+
+ public ExternalActionQuickAssistProposal(String contents, Image image, String description, IInvocationContext context) {
+ this.contents = contents;
+
+ proposal = new CompletionProposal("",context.getSelectionLength(),0,context.getSelectionOffset()+context.getSelectionLength(), image, description, null,null);
+ }
+
+ public String getContents() {
+ return contents;
+ }
+
+ public String getName() {
+ return null;
+ }
+
+ public int getRelevance() {
+ return 0;
+ }
+
+ abstract public void apply(IDocument document);
+
+ public String getAdditionalProposalInfo() {
+ return proposal.getAdditionalProposalInfo();
+ }
+
+ public IContextInformation getContextInformation() {
+ return proposal.getContextInformation();
+ }
+
+ public String getDisplayString() {
+ return proposal.getDisplayString();
+ }
+
+ public Image getImage() {
+ return proposal.getImage();
+ }
+
+ public Point getSelection(IDocument document) {
+ return proposal.getSelection( document );
+ }
+ }
+
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 3 months
JBoss Tools SVN: r6913 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-13 11:28:37 -0400 (Thu, 13 Mar 2008)
New Revision: 6913
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1668
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2008-03-13 15:28:25 UTC (rev 6912)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2008-03-13 15:28:37 UTC (rev 6913)
@@ -53,7 +53,6 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;
@@ -424,8 +423,7 @@
}
} catch(HibernateConsoleRuntimeException hcr) {
logErrorMessage("Error while reading console configuration", hcr);
- }
-
+ }
}
@@ -451,20 +449,19 @@
"Hibernate Console", message, s);
}
- public void openCriteriaEditor(String consoleName, String criteria) {
+ public IEditorPart openCriteriaEditor(String consoleName, String criteria) {
try {
- final IWorkbenchWindow activeWorkbenchWindow =
- PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage page = activeWorkbenchWindow.getActivePage();
+ IWorkbenchPage page = getActiveWorkbenchWindow().getActivePage();
CriteriaEditorStorage storage = new CriteriaEditorStorage(consoleName, criteria==null?"":criteria);
final CriteriaEditorInput editorInput = new CriteriaEditorInput(storage);
- page.openEditor(editorInput, "org.hibernate.eclipse.criteriaeditor.CriteriaEditor", true);
+ return page.openEditor(editorInput, "org.hibernate.eclipse.criteriaeditor.CriteriaEditor", true);
//page.openEditor(editorInput, "org.eclipse.jdt.ui.CompilationUnitEditor", true);
} catch (PartInitException ex) {
logErrorMessage("Could not open Criteria editor for console:" + consoleName, ex);
+ return null;
}
}
16 years, 3 months
JBoss Tools SVN: r6911 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui: src/org/hibernate/eclipse/jdt/ui/internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-13 11:28:10 -0400 (Thu, 13 Mar 2008)
New Revision: 6911
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/CriteriaQuickAssistProcessor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLQuickAssistProcessor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1668
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-03-13 15:27:50 UTC (rev 6910)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF 2008-03-13 15:28:10 UTC (rev 6911)
@@ -16,7 +16,8 @@
org.eclipse.ui.workbench.texteditor,
org.eclipse.gef,
org.hibernate.eclipse,
- org.hibernate.eclipse.console
+ org.hibernate.eclipse.console,
+ org.eclipse.ui.editors
Eclipse-LazyStart: true
Export-Package: org.hibernate.eclipse.jdt.ui,
org.hibernate.eclipse.jdt.ui.internal
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/CriteriaQuickAssistProcessor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/CriteriaQuickAssistProcessor.java 2008-03-13 15:27:50 UTC (rev 6910)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/CriteriaQuickAssistProcessor.java 2008-03-13 15:28:10 UTC (rev 6911)
@@ -33,10 +33,15 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.ITextEditor;
import org.hibernate.console.ImageConstants;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.console.actions.OpenMappingAction;
import org.hibernate.eclipse.console.utils.EclipseImages;
+import org.hibernate.eclipse.jdt.ui.Activator;
public class CriteriaQuickAssistProcessor extends BasicQuickAssistProcessor {
@@ -50,10 +55,16 @@
IDocument document = getDocument( context.getCompilationUnit() );
try {
String contents = document.get( context.getSelectionOffset(), context.getSelectionLength() );
+ // position of selection
+ final Point position = new Point( context.getSelectionOffset(), context.getSelectionLength() );
result = new IJavaCompletionProposal[1];
result[0] = new ExternalActionQuickAssistProposal(contents, EclipseImages.getImage(ImageConstants.CRITERIA_EDITOR), "Copy to Criteria Editor", context) {
public void apply(IDocument target) {
- HibernateConsolePlugin.getDefault().openCriteriaEditor(getName(), getContents());
+ //IEditorPart editorPart = HibernateConsolePlugin.getDefault().openCriteriaEditor(getName(), getContents());
+ IEditorPart editorPart = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ ITextEditor[] textEditors = OpenMappingAction.getTextEditors(editorPart);
+ if (textEditors.length == 0) return;
+ new SaveQueryEditorListener(textEditors[0], getName(), getContents(), position, SaveQueryEditorListener.CriteriaEditor);
}
};
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLQuickAssistProcessor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLQuickAssistProcessor.java 2008-03-13 15:27:50 UTC (rev 6910)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLQuickAssistProcessor.java 2008-03-13 15:28:10 UTC (rev 6911)
@@ -28,13 +28,17 @@
import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
import org.eclipse.jdt.ui.text.java.IProblemLocation;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.texteditor.ITextEditor;
import org.hibernate.console.ImageConstants;
-import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.console.actions.OpenMappingAction;
import org.hibernate.eclipse.console.utils.EclipseImages;
+import org.hibernate.eclipse.jdt.ui.Activator;
public class HQLQuickAssistProcessor extends BasicQuickAssistProcessor {
- public IJavaCompletionProposal[] getAssists(IInvocationContext context,
+ public IJavaCompletionProposal[] getAssists(final IInvocationContext context,
IProblemLocation[] locations) throws CoreException {
IJavaCompletionProposal[] result = new IJavaCompletionProposal[0];
@@ -45,16 +49,19 @@
return result;
}
- StringLiteral stringLiteral= (StringLiteral) coveringNode;
+ final StringLiteral stringLiteral= (StringLiteral) coveringNode;
String contents= stringLiteral.getLiteralValue();
result = new IJavaCompletionProposal[1];
result[0] = new ExternalActionQuickAssistProposal(contents, EclipseImages.getImage(ImageConstants.HQL_EDITOR), "Copy to HQL Editor", context) {
public void apply(IDocument document) {
- HibernateConsolePlugin.getDefault().openScratchHQLEditor( getName(), getContents() );
+ IEditorPart editorPart = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ ITextEditor[] textEditors = OpenMappingAction.getTextEditors(editorPart);
+ if (textEditors.length == 0) return;
+ Point position = new Point(stringLiteral.getStartPosition() + 1, stringLiteral.getLength() - 2);
+ new SaveQueryEditorListener(textEditors[0], getName(), getContents(), position, SaveQueryEditorListener.HQLEditor);
}
};
return result;
}
-
}
Added: 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 (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java 2008-03-13 15:28:10 UTC (rev 6911)
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.hibernate.eclipse.jdt.ui.internal;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.hibernate.eclipse.console.AbstractQueryEditor;
+import org.hibernate.eclipse.console.HibernateConsolePlugin;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class SaveQueryEditorListener implements IPropertyListener {
+
+ public static final int HQLEditor = 0;
+
+ public static final int CriteriaEditor = 1;
+
+ private ITextEditor fromEditorPart;
+ private AbstractQueryEditor editor;
+ private String query;
+ private Point position;
+
+ public SaveQueryEditorListener(ITextEditor fromEditorPart, String consoleName,
+ String query, Point position, int editorNum){
+ this.fromEditorPart = fromEditorPart;
+ this.query = query;
+ this.position = position;
+ switch (editorNum) {
+ case HQLEditor:
+ editor = (AbstractQueryEditor) HibernateConsolePlugin.getDefault()
+ .openScratchHQLEditor( consoleName, query );
+ break;
+
+ default:
+ editor = (AbstractQueryEditor) HibernateConsolePlugin.getDefault()
+ .openCriteriaEditor( consoleName, query );
+ }
+ editor.addPropertyListener(this);
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPropertyListener#propertyChanged(java.lang.Object, int)
+ */
+ public void propertyChanged(Object source, int propId) {
+ if (IEditorPart.PROP_DIRTY == propId && !editor.isDirty()){
+ String newQuery = editor.getQueryString();
+
+ IDocumentProvider docProvider = fromEditorPart.getDocumentProvider();
+ if (docProvider == null){ // editor was disposed
+ editor.removePropertyListener(this);
+ return;
+ }
+
+ IDocument doc = docProvider.getDocument( fromEditorPart.getEditorInput() );
+ boolean isDocChanged = true;
+ try {
+ if (query.equals(doc.get(position.x, position.y))){
+ isDocChanged = false;
+ }
+ } catch (BadLocationException e1) {
+ //document changed and we can get the exception
+ }
+
+ if (isDocChanged){
+ String title = "Document was changed";
+ String question = "Document was changed. Can't find string to replace.";
+ MessageDialog.openConfirm( null, title, question);
+ return;
+ }
+
+ 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) {
+ HibernateConsolePlugin.getDefault().log(e);
+ }
+ }
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/SaveQueryEditorListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 3 months
JBoss Tools SVN: r6910 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-13 11:27:50 -0400 (Thu, 13 Mar 2008)
New Revision: 6910
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1668
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2008-03-13 14:33:11 UTC (rev 6909)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2008-03-13 15:27:50 UTC (rev 6910)
@@ -654,23 +654,7 @@
</moveParticipant-->
</extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.hibernate.eclipse.console.commands.openHQLHandler"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+4">
- </key>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="org.hibernate.eclipse.console.commands.OpenHQLHandler"
- id="org.hibernate.eclipse.console.commands.openHQLHandler"
- name="org.hibernate.eclipse.console.openHQLHandler">
- </command>
- </extension>
-<!-- <extension
+ <!-- <extension
point="org.eclipse.ui.themes">
<themeElementCategory
id="org.hibernate.eclipse.presentation.hql"
16 years, 3 months
JBoss Tools SVN: r6909 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-03-13 10:33:11 -0400 (Thu, 13 Mar 2008)
New Revision: 6909
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionFactory.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1466
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionFactory.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionFactory.java 2008-03-13 14:24:16 UTC (rev 6908)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionFactory.java 2008-03-13 14:33:11 UTC (rev 6909)
@@ -12,29 +12,28 @@
import java.util.HashMap;
import java.util.Map;
-
import org.jboss.tools.vpe.VpePlugin;
public class VpeFunctionFactory {
- private static final String FUNC_JSF_VALUE = "jsfvalue";
- private static final String FUNC_NAME = "name";
- private static final String FUNC_NOT = "not";
- private static final String FUNC_IIF = "iif";
- private static final String FUNC_SRC = "src";
- private static final String FUNC_HREF = "href";
- private static final String FUNC_PARENT_NAME = "parentname";
- private static final String FUNC_HAS_IN_PARENTS = "hasinparents";
- private static final String FUNC_TAG_STRING = "tagstring";
- private static final String FUNC_TAG_TEXT = "tagtext";
- private static final String FUNC_ATTR_PRESENT = "attrpresent";
- private static final String FUNC_PARENT_ATTR_VALUE = "parentattrvalue";
- private static final String FUNC_HAS_CHILDREN = "haschildren";
- private static final String FUNC_HAS_CONTENT = "hascontent";
+ private static final String FUNC_JSF_VALUE = "jsfvalue";//$NON-NLS-1$
+ private static final String FUNC_NAME = "name";//$NON-NLS-1$
+ private static final String FUNC_NOT = "not";//$NON-NLS-1$
+ private static final String FUNC_IIF = "iif";//$NON-NLS-1$
+ private static final String FUNC_SRC = "src";//$NON-NLS-1$
+ private static final String FUNC_HREF = "href";//$NON-NLS-1$
+ private static final String FUNC_PARENT_NAME = "parentname";//$NON-NLS-1$
+ private static final String FUNC_HAS_IN_PARENTS = "hasinparents";//$NON-NLS-1$
+ private static final String FUNC_TAG_STRING = "tagstring";//$NON-NLS-1$
+ private static final String FUNC_TAG_TEXT = "tagtext";//$NON-NLS-1$
+ private static final String FUNC_ATTR_PRESENT = "attrpresent";//$NON-NLS-1$
+ private static final String FUNC_PARENT_ATTR_VALUE = "parentattrvalue";//$NON-NLS-1$
+ private static final String FUNC_HAS_CHILDREN = "haschildren";//$NON-NLS-1$
+ private static final String FUNC_HAS_CONTENT = "hascontent";//$NON-NLS-1$
- private static Map clsMap = new HashMap();
+ private static Map<String,Class<?>> clsMap = new HashMap<String,Class<?>>();
static VpeFunction getFunction(String name) {
- Class cls = (Class) clsMap.get(name);
+ Class<?> cls = clsMap.get(name);
if (cls == null) {
cls = createCls(name);
if (cls != null) {
@@ -51,7 +50,7 @@
}
}
- private static Class createCls(String name) {
+ private static Class<?> createCls(String name) {
if (FUNC_JSF_VALUE.equals(name)) {
return VpeFunctionJsfValue.class;
} else if (FUNC_NAME.equals(name)) {
@@ -80,6 +79,8 @@
return VpeFunctionHasChildren.class;
} else if (FUNC_HAS_CONTENT.equals(name)) {
return VpeFunctionHasContent.class;
+ } else if(VpeFunctionTldVersionCheck.FUNCTION_NAME.equals(name)) {
+ return VpeFunctionTldVersionCheck.class;
}
return null;
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java 2008-03-13 14:33:11 UTC (rev 6909)
@@ -0,0 +1,171 @@
+/*******************************************************************************
+* 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 org.jboss.tools.vpe.editor.template.expression;
+
+import java.text.DecimalFormat;
+import java.text.ParseException;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.ui.IFileEditorInput;
+import org.jboss.tools.common.kb.wtp.TLDVersionHelper;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.project.IModelNature;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.project.WebProject;
+import org.jboss.tools.jst.web.tld.TaglibData;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.XmlUtil;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ *
+ * Class created for check tld version for template
+ * here should be two numbers min and max tld version
+ * Examples of using:
+ * <vpe:tag name="f:testTldVersion" case-sensitive="yes">
+ * <vpe:if test="tld_version('min=0.0 max=1.2')" >
+ * <vpe:template children="yes" modify="yes">
+ * <div style="background-color:red">
+ * Tld Check function
+ * </div>
+ * </vpe:template>
+ * </vpe:if>
+ * </vpe:tag>
+ * <vpe:tag name="f:testTldVersion" case-sensitive="yes">
+ * <vpe:if test="tld_version('min=0.0')" >
+ * <vpe:template children="yes" modify="yes">
+ * <div style="background-color:red">
+ * Tld Check function
+ * </div>
+ * </vpe:template>
+ * </vpe:if>
+ * </vpe:tag>
+ * <vpe:tag name="f:testTldVersion" case-sensitive="yes">
+ * <vpe:if test="tld_version('max=1.2')" >
+ * <vpe:template children="yes" modify="yes">
+ * <div style="background-color:red">
+ * Tld Check function
+ * </div>
+ * </vpe:template>
+ * </vpe:if>
+ * </vpe:tag>
+ */
+public class VpeFunctionTldVersionCheck extends VpeFunction{
+
+ public static final String FUNCTION_NAME="tld_version"; //$NON-NLS-1$
+
+ private static final String MIN_VERSION_KEYWORD="min"; //$NON-NLS-1$
+
+ private static final String MAX_VERSION_KEYWORD="max";//$NON-NLS-1$
+
+ public VpeValue exec(VpePageContext pageContext, Node sourceNode) {
+ //gets function parameter
+ try {
+ String tagValue = getParameter(0).exec(pageContext, sourceNode)
+ .stringValue();
+
+ double startValue = getStartVersion(tagValue);
+
+ double endValue = getEndVersion(tagValue);
+
+ if(sourceNode==null || sourceNode.getPrefix()==null) {
+
+ return new VpeValue(false);
+ }
+
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(sourceNode,pageContext.getSourceBuilder().getStructuredTextViewer().getDocument());
+
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(sourceNode.getPrefix(), taglibs);
+ //this function works only for jsp files
+ String tldVersion = TLDVersionHelper.getTldVersion(sourceNodeTaglib.getUri(), sourceNodeTaglib.getPrefix(),
+ pageContext.getSourceBuilder().getStructuredTextViewer().getDocument());
+
+ double tldVersionNumber =0;
+ if(tldVersion!=null) {
+
+ tldVersionNumber = Double.parseDouble(tldVersion);
+
+ } else {
+ //here we getting tld version for xhtml files
+ XModel xm = null;
+ IProject project = ((IFileEditorInput)pageContext.getEditPart().getEditorInput()).getFile().getProject();
+ IModelNature mn = EclipseResourceUtil.getModelNature(project);
+ if(mn!=null) {
+ xm = mn.getModel();
+ }
+ tldVersion=WebProject.getTldVersion(sourceNodeTaglib.getUri(),
+ sourceNodeTaglib.getPrefix(),
+ pageContext.getSourceBuilder().getStructuredTextViewer().getDocument(),
+ xm);
+ if(tldVersion!=null) {
+
+ tldVersionNumber = Double.parseDouble(tldVersion);
+ } else {
+ tldVersionNumber = 0;
+ }
+ }
+ if((startValue<=tldVersionNumber)&&
+ (endValue>=tldVersionNumber)) {
+
+ return new VpeValue(true);
+ } else {
+
+ return new VpeValue(false);
+ }
+ }catch (Exception e) {
+ //if this function throws exception templates are not working more, so we should processed it's here
+ VpePlugin.getPluginLog().logError(e);
+ }
+ return null;
+ }
+
+ private double getStartVersion(String tagValue) {
+
+ DecimalFormat decimalFormat = new DecimalFormat("#*.#*"); //$NON-NLS-1$
+
+ try {
+ if(tagValue.indexOf(MIN_VERSION_KEYWORD)!=-1){
+
+ return (-1)*decimalFormat.parse(tagValue.
+ substring(tagValue.indexOf(MIN_VERSION_KEYWORD)+4)).doubleValue();
+ } else {
+
+ return (-1)*Double.MAX_VALUE;
+ }
+ } catch (ParseException e) {
+
+ VpePlugin.getPluginLog().logError(e);
+ }
+ return (-1)*Double.MAX_VALUE;
+ }
+
+ private double getEndVersion(String tagValue) {
+
+ DecimalFormat decimalFormat = new DecimalFormat("#*.#*"); //$NON-NLS-1$
+
+ try{
+ if(tagValue.indexOf(MAX_VERSION_KEYWORD)!=-1) {
+
+ return (-1)*decimalFormat.parse(tagValue.substring(tagValue.
+ indexOf(MAX_VERSION_KEYWORD)+4)).doubleValue();
+ }else {
+ return Double.MAX_VALUE;
+ }
+ } catch (ParseException e) {
+
+ VpePlugin.getPluginLog().logError(e);
+ }
+ return Double.MAX_VALUE;
+ }
+}
16 years, 3 months
JBoss Tools SVN: r6908 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-03-13 10:24:16 -0400 (Thu, 13 Mar 2008)
New Revision: 6908
Modified:
trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-262 corrections (because some unusable images were deleted)
Modified: trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml 2008-03-13 14:20:16 UTC (rev 6907)
+++ trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml 2008-03-13 14:24:16 UTC (rev 6908)
@@ -85,12 +85,12 @@
<title>Hibernate Core Concepts</title>
<mediaobject>
<imageobject role="fo">
- <imagedata fileref="images/architecture.png" format="PNG"/>
+ <imagedata fileref="images/code_generation/code_generation_1.png" format="PNG"/>
</imageobject>
<imageobject role="html">
- <imagedata align="center" fileref="images/architecture.png" format="PNG"/>
+ <imagedata align="center" fileref="images/code_generation/code_generation_1.png" format="PNG"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-03-13 14:20:16 UTC (rev 6907)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-03-13 14:24:16 UTC (rev 6908)
@@ -1120,12 +1120,12 @@
<title>Overview Page</title>
<mediaobject>
<imageobject role="fo">
- <imagedata align="center" scale="80" fileref="images/plugins/plugins_13a.png" format="PNG"
+ <imagedata align="center" scale="80" fileref="images/plugins/plugins_22.png" format="PNG"
/>
</imageobject>
<imageobject role="html">
- <imagedata align="center" fileref="images/plugins/plugins_13a.png" format="PNG"/>
+ <imagedata align="center" fileref="images/plugins/plugins_22.png" format="PNG"/>
</imageobject>
</mediaobject>
</figure>
16 years, 3 months