コード例 #1
0
ファイル: WorkbookLoader.java プロジェクト: gedaofeng/xmind3
 private void loadMarkerSheet() throws IOException, CoreException {
   try {
     IMarkerSheet markerSheet =
         ((MarkerSheetBuilderImpl) Core.getMarkerSheetBuilder())
             .loadFromInputSource(source, this, new WorkbookMarkerResourceProvider(workbook));
     workbook.setMarkerSheet((MarkerSheetImpl) markerSheet);
   } catch (IOException e) {
     throw e;
   } catch (CoreException e) {
     if (e.getType() != Core.ERROR_NO_SUCH_ENTRY) throw e;
   }
 }
コード例 #2
0
  @Before
  public void setUp() throws Exception {
    IMarkerSheet globalMarkers;
    InputStream markerSheetStream =
        new URL("platform:/plugin/org.xmind.core.runtime.tests/samples/markers.xml").openStream();
    try {
      globalMarkers = Core.getMarkerSheetBuilder().loadFromStream(markerSheetStream, null);
    } finally {
      markerSheetStream.close();
    }
    IInputSource source =
        new BundleResourceInputSource(
            "org.xmind.core.runtime.tests", "/samples/sample1.xmind"); // $NON-NLS-2$
    workbook = Core.getWorkbookBuilder().loadFromInputSource(source, new ByteArrayStorage(), null);
    workbook.getMarkerSheet().setParentSheet(globalMarkers);

    axisProvider = new CoreAxisProvider();
  }