9910

单飞

   :: 首页 :: 联系 :: 聚合  :: 管理
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


posted on 2008-08-01 15:56 单飞 阅读(475) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: