本文整理匯總了Java中org.eclipse.pde.core.IModelProviderEvent類的典型用法代碼示例。如果您正苦於以下問題:Java IModelProviderEvent類的具體用法?Java IModelProviderEvent怎麽用?Java IModelProviderEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IModelProviderEvent類屬於org.eclipse.pde.core包,在下文中一共展示了IModelProviderEvent類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createSingleModel
import org.eclipse.pde.core.IModelProviderEvent; //導入依賴的package包/類
private void createSingleModel(IProject project, IFile product, boolean notify) {
IProductModel model = new WorkspaceProductModel(product, true);
loadModel(model, false);
if (getModelsMap() == null) {
setModelsMap(new HashMap<IProject, Collection<IProductModel>>());
}
Collection<IProductModel> models = getModelsMap().get(project);
if (models == null) {
models = new ArrayList<IProductModel>();
getModelsMap().put(project, models);
}
models.add(model);
if (notify) {
addChange(model, IModelProviderEvent.MODELS_ADDED);
}
}
示例2: handleFileDelta
import org.eclipse.pde.core.IModelProviderEvent; //導入依賴的package包/類
@Override
protected void handleFileDelta(IResourceDelta delta) {
IFile file = (IFile) delta.getResource();
IProject project = file.getProject();
if (ProductSupport.isProductFile(file)) {
Object model = getSingleModel(file);
int kind = delta.getKind();
if (kind == IResourceDelta.REMOVED && model != null) {
removeSingleModel(project, model);
} else if (kind == IResourceDelta.ADDED && model == null) {
createSingleModel(project, file, true);
} else if (kind == IResourceDelta.CHANGED && (IResourceDelta.CONTENT & delta.getFlags()) != 0) {
loadModel((IProductModel) model, true);
addChange(model, IModelProviderEvent.MODELS_CHANGED);
}
}
}
示例3: removeModel
import org.eclipse.pde.core.IModelProviderEvent; //導入依賴的package包/類
@Override
protected Object removeModel(IProject project) {
Collection<IProductModel> models = getModelsMap() != null ? getModelsMap().remove(project) : null;
if (models != null) {
for (IProductModel model : models) {
addChange(model, IModelProviderEvent.MODELS_REMOVED);
}
}
return models;
}
示例4: removeSingleModel
import org.eclipse.pde.core.IModelProviderEvent; //導入依賴的package包/類
private Object removeSingleModel(IProject project, Object model) {
Collection<IProductModel> models = getModelsMap() != null ? getModelsMap().get(project) : null;
if (models != null) {
if (models.remove(model)) {
addChange(model, IModelProviderEvent.MODELS_REMOVED);
}
if (models.isEmpty()) {
getModelsMap().remove(project);
}
}
return models;
}
示例5: ProductModelManager
import org.eclipse.pde.core.IModelProviderEvent; //導入依賴的package包/類
private ProductModelManager() {
this.workspaceProductModelManager = new WorkspaceProductModelManager();
this.workspaceProductModelManager.addModelProviderListener(new IModelProviderListener() {
@Override
public void modelsChanged(IModelProviderEvent event) {
handleModelProviderChange(event);
}
});
}
示例6: modelsChanged
import org.eclipse.pde.core.IModelProviderEvent; //導入依賴的package包/類
public void modelsChanged(IModelProviderEvent event) {
}
示例7: modelsChanged
import org.eclipse.pde.core.IModelProviderEvent; //導入依賴的package包/類
@Override
public void modelsChanged(IModelProviderEvent event) {
// TODO Auto-generated method stub
}