Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornhauge2010-10-19 12:57:26 -0400
committernhauge2010-10-19 12:57:26 -0400
commitc033ea5b1afc82e499b8f584cd7981acf9dba50f (patch)
tree95ac83e1c3f58d875d08834aa227ba87c0c50ebd
parente3e1e581b07b770b459e01196d7bc45bad2c3484 (diff)
downloadwebtools.dali-c033ea5b1afc82e499b8f584cd7981acf9dba50f.tar.gz
webtools.dali-c033ea5b1afc82e499b8f584cd7981acf9dba50f.tar.xz
webtools.dali-c033ea5b1afc82e499b8f584cd7981acf9dba50f.zip
[313750] Provide link to facets page on JPA properties page.
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties1
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/properties/JpaProjectPropertiesPage.java23
3 files changed, 25 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties b/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties
index c75210058f..1372744239 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties
+++ b/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties
@@ -100,6 +100,7 @@ JpaFacetWizardPage_overrideDefaultCatalogLabel=&Override default catalog from co
JpaFacetWizardPage_defaultCatalogLabel=Catalo&g:
JpaFacetWizardPage_overrideDefaultSchemaLabel=O&verride default schema from connection
JpaFacetWizardPage_defaultSchemaLabel=&Schema:
+JpaFacetWizardPage_facetsPageLink=<a>Change JPA version...</a>
JpaFacetWizardPage_jpaImplementationLabel=JPA implementation
JpaFacetWizardPage_userServerLibLabel=Implementation provided by server runtime
JpaFacetWizardPage_specifyLibLabel=Implementation library:
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java
index 3a15ba9c6b..6b07efdad6 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java
@@ -84,6 +84,7 @@ public class JptUiMessages {
public static String JpaFacetWizardPage_description;
public static String JpaFacetWizardPage_discoverClassesButton;
public static String JpaFacetWizardPage_driverLibraryLabel;
+ public static String JpaFacetWizardPage_facetsPageLink;
public static String JpaFacetWizardPage_metamodelSourceFolderLink;
public static String JpaFacetWizardPage_jpaImplementationLabel;
public static String JpaFacetWizardPage_jpaPrefsLink;
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/properties/JpaProjectPropertiesPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/properties/JpaProjectPropertiesPage.java
index 3a8e42d084..9723b4c729 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/properties/JpaProjectPropertiesPage.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/properties/JpaProjectPropertiesPage.java
@@ -124,6 +124,8 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage;
+
import com.ibm.icu.text.Collator;
/**
@@ -513,6 +515,27 @@ public class JpaProjectPropertiesPage
platformDropDown,
JPA_PLATFORM_LABEL_CONVERTER
);
+
+ Link facetsPageLink = this.buildLink(group, JptUiMessages.JpaFacetWizardPage_facetsPageLink);
+ facetsPageLink.addSelectionListener(this.buildFacetsPageLinkListener()); // the link will be GCed
+ System.out.println(facetsPageLink.isEnabled());
+ }
+
+ private SelectionListener buildFacetsPageLinkListener() {
+ return new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ JpaProjectPropertiesPage.this.openProjectFacetsPage();
+ }
+ @Override
+ public String toString() {
+ return "facets page link listener"; //$NON-NLS-1$
+ }
+ };
+ }
+
+ protected void openProjectFacetsPage() {
+ ((IWorkbenchPreferenceContainer)getContainer()).openPage(FacetsPropertyPage.ID, null);
}
/**

Back to the top