1 11 package org.eclipse.pde.internal.ui.model.build; 12 13 import java.io.*; 14 import org.eclipse.core.runtime.*; 15 import org.eclipse.jface.text.*; 16 import org.eclipse.pde.core.build.*; 17 import org.eclipse.pde.internal.core.*; 18 import org.eclipse.pde.internal.ui.model.*; 19 20 21 public class BuildModel extends AbstractEditingModel implements IBuildModel { 22 23 private BuildModelFactory fFactory; 25 private Build fBuild; 26 27 31 public BuildModel(IDocument document, boolean isReconciling) { 32 super(document, isReconciling); 33 } 34 37 protected NLResourceHelper createNLResourceHelper() { 38 return null; 39 } 40 41 44 public void load(InputStream source, boolean outOfSync) throws CoreException { 45 try { 46 fLoaded = true; 47 ((Build)getBuild()).load(source); 48 } catch (IOException e) { 49 fLoaded = false; 50 } 51 } 52 53 56 protected void adjustOffsets(IDocument document) { 57 ((Build)getBuild()).adjustOffsets(document); 58 } 59 60 63 public IBuild getBuild() { 64 if (fBuild == null) 65 fBuild = new Build(this); 66 return fBuild; 67 } 68 71 public IBuildModelFactory getFactory() { 72 if (fFactory == null) 73 fFactory = new BuildModelFactory(this); 74 return fFactory; 75 } 76 } 77 | Popular Tags |