我使用Eclipse插件创建了一个新的编辑器。 但是不会创建任何断点。 我认为是CompilationUnitEditor的问题,所以请回答解决方案。
@Override
protected void createPages() {
try {
// Sets file name as title
this.setPartName(getEditorInput().getName());
// service editor
editor = new CompilationUnitEditor();
addPage(Page.SERVICE_SOURCE.ordinal(), editor, getEditorInput());
setPageText(Page.SERVICE_SOURCE.ordinal(), EditConst.TITLE_SERVICE_EDITOR_TAB1);
// initializes
iCompilationUnit = JavaUI.getWorkingCopyManager().getWorkingCopy(getEditorInput());
// service viewer
viewer = new ServiceViewer(getContainer(), this, iCompilationUnit);
addPage(Page.SERVICE_VIEWER.ordinal(), viewer);
setPageText(Page.SERVICE_VIEWER.ordinal(), EditConst.TITLE_SERVICE_EDITOR_TAB2);
// service PMD
inspection = new ServiceInspection(getContainer(), this, iCompilationUnit);
addPage(Page.SERVICE_INSPECTION.ordinal(), inspection);
setPageText(Page.SERVICE_INSPECTION.ordinal(), EditConst.TITLE_SERVICE_EDITOR_TAB3);
// add event listener
addPageChangedListener(this);
}catch(Exception e) {
e.printStackTrace(System.err);
throw new RuntimeException(e);
}
}