use of org.eclipse.ui.views.navigator.ResourceSorter in project webtools.sourceediting by eclipse.
the class PropertyPreferencePage method openProjectSettings.
void openProjectSettings() {
ListDialog dialog = new ListDialog(getShell()) {
protected Control createDialogArea(Composite container) {
Control area = super.createDialogArea(container);
getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
return area;
}
};
dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
dialog.setContentProvider(new IStructuredContentProvider() {
public void dispose() {
}
public Object[] getElements(Object inputElement) {
return ((IWorkspace) inputElement).getRoot().getProjects();
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
});
dialog.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), SSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
dialog.setInput(ResourcesPlugin.getWorkspace());
dialog.setTitle(SSEUIMessages.PropertyPreferencePage_01);
if (dialog.open() == Window.OK) {
Object[] result = dialog.getResult();
if (result.length > 0) {
IProject project = (IProject) dialog.getResult()[0];
Map data = new HashMap();
data.put(DISABLE_LINK, Boolean.TRUE);
PreferencesUtil.createPropertyDialogOn(getShell(), project, getPropertyPageID(), new String[] { getPropertyPageID() }, data).open();
}
}
}
use of org.eclipse.ui.views.navigator.ResourceSorter in project webtools.sourceediting by eclipse.
the class AbstractPropertyPreferencePage method openProjectSettings.
void openProjectSettings() {
ListDialog dialog = new ListDialog(getShell()) {
protected Control createDialogArea(Composite container) {
Control area = super.createDialogArea(container);
getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
return area;
}
};
dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
dialog.setContentProvider(new IStructuredContentProvider() {
public void dispose() {
}
public Object[] getElements(Object inputElement) {
return ((IWorkspace) inputElement).getRoot().getProjects();
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
});
dialog.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), SSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
dialog.setInput(ResourcesPlugin.getWorkspace());
dialog.setTitle(SSEUIMessages.PropertyPreferencePage_01);
if (dialog.open() == Window.OK) {
Object[] result = dialog.getResult();
if (result.length > 0) {
IProject project = (IProject) dialog.getResult()[0];
Map data = new HashMap();
data.put(DISABLE_LINK, Boolean.TRUE);
PreferencesUtil.createPropertyDialogOn(getShell(), project, getPropertyPageID(), new String[] { getPropertyPageID() }, data).open();
}
}
}
use of org.eclipse.ui.views.navigator.ResourceSorter in project webtools.sourceediting by eclipse.
the class PropertyPreferencePage method openProjectSettings.
void openProjectSettings() {
ListDialog dialog = new ListDialog(getShell()) {
@Override
protected Control createDialogArea(Composite container) {
Control area = super.createDialogArea(container);
getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
return area;
}
};
dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
dialog.setContentProvider(new IStructuredContentProvider() {
public void dispose() {
}
public Object[] getElements(Object inputElement) {
return ((IWorkspace) inputElement).getRoot().getProjects();
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
});
dialog.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), SSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
dialog.setInput(ResourcesPlugin.getWorkspace());
dialog.setTitle(SSEUIMessages.PropertyPreferencePage_01);
if (dialog.open() == Window.OK) {
Object[] result = dialog.getResult();
if (result.length > 0) {
IProject project = (IProject) dialog.getResult()[0];
Map data = new HashMap();
data.put(DISABLE_LINK, Boolean.TRUE);
PreferencesUtil.createPropertyDialogOn(getShell(), project, getPropertyPageID(), new String[] { getPropertyPageID() }, data).open();
}
}
}
use of org.eclipse.ui.views.navigator.ResourceSorter in project liferay-ide by liferay.
the class PropertyPreferencePage method _openProjectSettings.
private void _openProjectSettings() {
ListDialog dialog = new ListDialog(getShell()) {
@Override
protected Control createDialogArea(Composite container) {
Control area = super.createDialogArea(container);
getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
return area;
}
};
dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
dialog.setContentProvider(new IStructuredContentProvider() {
public void dispose() {
}
public Object[] getElements(Object inputElement) {
return ((IWorkspace) inputElement).getRoot().getProjects();
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
});
IWorkbench workbench = SSEUIPlugin.getDefault().getWorkbench();
dialog.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), workbench.getDecoratorManager().getLabelDecorator()));
dialog.setInput(ResourcesPlugin.getWorkspace());
dialog.setTitle(SSEUIMessages.PropertyPreferencePage_01);
if (dialog.open() == Window.OK) {
Object[] result = dialog.getResult();
if (ListUtil.isNotEmpty(result)) {
IProject project = (IProject) dialog.getResult()[0];
Map data = new HashMap();
data.put(_disableLink, Boolean.TRUE);
PreferencesUtil.createPropertyDialogOn(getShell(), project, getPropertyPageID(), new String[] { getPropertyPageID() }, data).open();
}
}
}
Aggregations