use of org.eclipse.xtext.xbase.lib.Pair in project erlide_eclipse by erlang.
the class ErlModelCache method removeProject.
public void removeProject(final IErlProject project) {
// ErlLogger.debug("removeForProject %s", project.getName());
final List<IErlModule> includes = projectIncludeCache.getIfPresent(project);
if (includes != null) {
for (final IErlModule module : includes) {
moduleIncludeCache.invalidate(module);
}
}
final List<IErlModule> modules = projectModuleCache.getIfPresent(project);
if (modules != null) {
for (final IErlModule module : modules) {
moduleIncludeCache.invalidate(module);
}
}
projectIncludeCache.invalidate(project);
projectModuleCache.invalidate(project);
final Set<String> keysToRemove = Sets.newHashSet();
final Set<Entry<String, Pair<IErlProject, List<ExternalTreeEntry>>>> entrySet = externalTreeCache.asMap().entrySet();
for (final Entry<String, Pair<IErlProject, List<ExternalTreeEntry>>> entry : entrySet) {
if (entry.getValue().getKey() == project) {
keysToRemove.add(entry.getKey());
}
}
for (final String keyToRemove : keysToRemove) {
externalTreeCache.invalidate(keyToRemove);
}
}
use of org.eclipse.xtext.xbase.lib.Pair in project erlide_eclipse by erlang.
the class ErlidePreferencePage method addCheckBox.
protected Pair<Button, String> addCheckBox(final Composite parent, final String label, final String key, final int indentation) {
final Button checkBox = new Button(parent, SWT.CHECK);
checkBox.setText(label);
final GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent = indentation;
gd.horizontalSpan = 2;
checkBox.setLayoutData(gd);
return new Pair<>(checkBox, getDialogPreferenceKey() + "/" + key);
}
Aggregations