}
if (selection != 0) {
if (selection==1) {
doNotAskAgain = true;
}
IAdaptable info = new IAdaptable() {
public Object getAdapter(Class adapter) {
if (Shell.class.equals(adapter))
return view.getSite().getShell();
if (String.class.equals(adapter))
return "user";
return null;
}
};
server.publish(IServer.PUBLISH_CLEAN, modules, info, null);
}
}
};
cleanAction.setText("Clean Publish...");
cleanAction.setToolTipText("Clean and Publish...");
ImageDescriptor cleanAndPublishImageDesc = new DecorationOverlayIcon(
ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_PUBLISH).createImage(),
ImageDescriptor.createFromFile(SharedImages.class, "refresh.gif"), IDecoration.BOTTOM_RIGHT);
cleanAction.setImageDescriptor(cleanAndPublishImageDesc);
cleanAction.setId("org.apache.sling.ide.eclipse.ui.actions.CleanPublishAction");
publishAction = new Action("Publish", IAction.AS_PUSH_BUTTON) {
public void run() {
if (server==null) {
MessageDialog.openInformation(view.getSite().getShell(), "No server selected", "A server must be selected");
return;
}
IAdaptable info = new IAdaptable() {
public Object getAdapter(Class adapter) {
if (Shell.class.equals(adapter))
return view.getSite().getShell();
if (String.class.equals(adapter))
return "user";