xlst ? 怎么玩啊?
This won't delete the perspective if it is defined in an extension.
The perspective defined in an extension can't be deleted in Eclipse 3.2.
In Eclipse 3.3, it is possible to delete it using xslt, see http://wiki.eclipse.org/Product_Customization
Snjeza
Hiamansu S Swain wrote:
Hi Ajay,
Create this class in any package of your application and make some action on your UI side and run call this class....
import org.eclipse.ui.IPerspectiveDescriptor;
import org.eclipse.ui.IPerspectiveRegistry;
import org.eclipse.ui.PlatformUI;
public class DeleteUserPerspective {
/**The Constructor**/
public DeleteUserPerspective () {
IPerspectiveRegistry iPerspectiveRegistry = PlatformUI.getWorkbench).getPerspectiveRegistry();
IPerspectiveDescriptor perspectiveDescriptor = iPerspectiveRegistry.findPerspectiveWithLabel("<perpsectiveName>");
try {
iPerspectiveRegistry.deletePerspective(perspectiveDescriptor);
} catch (Exception e) {
System.out.println("=====DELETED=====");
}
}
}
Thanks
Himansu