Community
Participate
Working Groups
Steps To Reproduce: (1) Create new extension point schema (2) Switch to "Definition" page (3) Create a new element (4) Create a new attribute for that element (5) Set the new attribute's type as "java" (6) Specify "org.eclipse.ui.NonExistingClass" in the "Extends" field (7) Click the "Extends" hyperlink -> "New Java Class" wizard opens -> BUG: The following wizard fields are not preloaded with values: "Source folder", "Package", "Name" -> BUG: Same problem exists for the "Implements" hyperlink. Expected Behaviour: Wizard fields are preloaded with appropriate values (see "class" attribute hyperlinks in Plug-in Manifest Editor) with clicking on the "Extends" or "Implements" hyperlink using contents from "Extends" or "Implements" field.
*** Bug 186653 has been marked as a duplicate of this bug. ***
Created attachment 73489 [details] patch
Comment on attachment 73489 [details] patch Tested good; but, a few minor problems. See next comment for details.
Fixed Minor Problems (See updated patch) * NLS Escaped String "." * Updated copyright * Suppressed printing out of Java exception stack trace Minor Problems Still Present: * Inputting "." in either field produces an exception when the hyperlink is clicked: java.lang.IllegalArgumentException: Path must include project and resource name: /org.example.rcp at org.eclipse.core.runtime.Assert.isLegal(Assert.java:62) at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1625) at org.eclipse.core.internal.resources.Container.getFolder(Container.java:130) at org.eclipse.pde.internal.ui.editor.schema.NewClassCreationWizard.initializeValues(NewClassCreationWizard.java:95) at org.eclipse.pde.internal.ui.editor.schema.NewClassCreationWizard.<init>(NewClassCreationWizard.java:36) at org.eclipse.pde.internal.ui.editor.schema.SchemaAttributeDetails.handleLinkActivated(SchemaAttributeDetails.java:490) * The text field populates the wizard page with invalid class / interface characters (e.g. @#$ and spaces, etc.) Use of this utility before setting on wizard will help: String name = TextUtil.trimNonAlphaChars(text.getText()).replace('$', '.');
Created attachment 73499 [details] Updated patch fixing minor problems
Created attachment 73594 [details] patch fixing remaining problems Trimming non alpha characters off the input resolved the IllegalArgumentException as an input of "." will now be turned into "". Also eliminated one case from an if that is handled the same by leaving it for the String.substring(int) method called in the else block.
Comment on attachment 73594 [details] patch fixing remaining problems Tested well, Adam. Thanks
Patch applied to HEAD. Target: 3.4 M1