diff options
author | kmoore | 2012-02-02 16:35:08 +0000 |
---|---|---|
committer | kmoore | 2012-02-02 16:35:08 +0000 |
commit | 830e68343f2a983859f376cbcac8bab17f8aa764 (patch) | |
tree | 54953a67a60f656b2bcfe4a5bbba2752ec2b9781 /common/plugins | |
parent | 3df915a8b6354262d293bb78e6f095d170f52a2a (diff) | |
download | webtools.dali-830e68343f2a983859f376cbcac8bab17f8aa764.tar.gz webtools.dali-830e68343f2a983859f376cbcac8bab17f8aa764.tar.xz webtools.dali-830e68343f2a983859f376cbcac8bab17f8aa764.zip |
Bug 277017 - class chooser widgets don't work if package is set in orm.xml
Diffstat (limited to 'common/plugins')
-rw-r--r-- | common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/widgets/ClassChooserPane.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/widgets/ClassChooserPane.java b/common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/widgets/ClassChooserPane.java index e2eb246e3e..ddfc9316da 100644 --- a/common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/widgets/ClassChooserPane.java +++ b/common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/widgets/ClassChooserPane.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. + * Copyright (c) 2008, 2012 Oracle. All rights reserved. * This program and the accompanying materials are 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. @@ -157,7 +157,7 @@ public abstract class ClassChooserPane<T extends Model> extends ChooserPane<T> } protected void hyperLinkSelected() { - IType type = getType(); + IType type = resolveJdtType(); if (type != null) { openInEditor(type); } @@ -166,18 +166,11 @@ public abstract class ClassChooserPane<T extends Model> extends ChooserPane<T> } } - protected IType getType() { - if (getClassName() == null) { + protected IType resolveJdtType() { + if (this.getClassName() == null) { return null; } - IType type = null; - try { - type = getJavaProject().findType(getClassName().replace('$', '.')); - } - catch (JavaModelException e) { - JptCommonUiPlugin.log(e); - } - return type; + return JDTTools.findType(this.getJavaProject(), this.getClassName().replace('$', '.')); } protected void createType() { @@ -248,9 +241,8 @@ public abstract class ClassChooserPane<T extends Model> extends ChooserPane<T> } protected void openInEditor(IType type) { - IJavaElement javaElement = type.getParent(); try { - JavaUI.openInEditor(javaElement, true, true); + JavaUI.openInEditor(type, true, true); } catch (JavaModelException e) { JptCommonUiPlugin.log(e); |