Skip to content

Commit

Permalink
Remove default TODO messages and fix several line mixtures (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
sschulz92 authored Sep 8, 2021
1 parent ce05c92 commit 4468dd6
Show file tree
Hide file tree
Showing 42 changed files with 1,153 additions and 1,475 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class LocalProcessFolder implements IResolve {
/**
* LocalProcessFolder constructor with package visibility as it should only be constructed by
* LocalProcessService.
*
*
* @param service
* @param factory
*/
Expand All @@ -48,7 +48,7 @@ public class LocalProcessFolder implements IResolve {
this.factory = factory;
this.id = new ID( service.getID() + "/" + factory.getClass().getSimpleName(), "local" );
}

public ProcessFactory getFactory() {
return factory;
}
Expand Down Expand Up @@ -137,7 +137,6 @@ public String getTitle() {
}

public void dispose( IProgressMonitor monitor ) {
// TODO Auto-generated method stub

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

/**
* Gathers up all ProcessFactories findable by GeoTools into the local catalog.
*
*
* @author Jody Garnett (LISAsoft)
* @since 1.2.0
*/
Expand All @@ -40,7 +40,7 @@ public class LocalProcessService extends IService {
* ID used for geotools processes
*/
public final static String ID = "process:///localhost/geotools/process"; //$NON-NLS-1$

/** Service ID used for GeoTools processes */
public final static ID SERVICE_ID = new ID(ID,"geotools");

Expand All @@ -55,7 +55,7 @@ public Map<String, Serializable> getConnectionParams() {
params.put(LocalProcessServiceExtension.KEY, SERVICE_ID.toURL() );
return params;
}

public Status getStatus() {
if( folders == null ){
return super.getStatus();
Expand All @@ -71,7 +71,7 @@ public Throwable getMessage() {
public org.locationtech.udig.catalog.ID getID() {
return SERVICE_ID;
}

public URL getIdentifier() {
return SERVICE_ID.toURL();
}
Expand All @@ -83,11 +83,11 @@ public synchronized List<IResolve> members( IProgressMonitor monitor ) throws IO
for( ProcessFactory factory : Processors.getProcessFactories() ){
LocalProcessFolder folder = new LocalProcessFolder(this, factory );
folders.add( folder );
}
}
}
return folders;
}

/**
* This service does not provide any spatial data.
* @return null, as this service does not provide any spatial data
Expand All @@ -99,7 +99,6 @@ public List<? extends IGeoResource> resources( IProgressMonitor monitor ) throws

@Override
protected IServiceInfo createInfo( IProgressMonitor monitor ) throws IOException {
// TODO Auto-generated method stub
return null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* JGrass - Free Open Source Java GIS http://www.jgrass.org
* (C) HydroloGIS - www.hydrologis.com
* JGrass - Free Open Source Java GIS http://www.jgrass.org
* (C) HydroloGIS - www.hydrologis.com
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -49,7 +49,7 @@
* This class supplies a tree viewer containing the JGrass mapsets that are in the catalog When a
* mapset is selected it is passed to the WidgetObservers that are registered with this class.
* </p>
*
*
* @author Andrea Antonello - www.hydrologis.com
* @since 1.1.0
*/
Expand Down Expand Up @@ -119,7 +119,7 @@ public void selectionChanged( SelectionChangedEvent event ) {
private class ContentProvider implements ITreeContentProvider {
/**
* Gets the children of the specified object
*
*
* @param arg0 the parent object
* @return Object[]
*/
Expand Down Expand Up @@ -171,7 +171,7 @@ private Object[] filteredLayers( List<IResolve> layers ) {
}
/**
* Gets the parent of the specified object
*
*
* @param arg0 the object
* @return Object
*/
Expand All @@ -190,7 +190,7 @@ public Object getParent( Object arg0 ) {

/**
* Returns whether the passed object has children
*
*
* @param arg0 the parent object
* @return boolean
*/
Expand All @@ -205,7 +205,7 @@ public boolean hasChildren( Object arg0 ) {

/**
* Gets the root element(s) of the tree
*
*
* @param arg0 the input data
* @return Object[]
*/
Expand Down Expand Up @@ -241,7 +241,7 @@ public void dispose() {

/**
* Called when the input changes
*
*
* @param arg0 the viewer
* @param arg1 the old input
* @param arg2 the new input
Expand Down Expand Up @@ -297,7 +297,7 @@ public LabelProvider() {

/**
* Gets the image to display for a node in the tree
*
*
* @param arg0 the node
* @return Image
*/
Expand All @@ -313,7 +313,7 @@ public Image getImage( Object arg0 ) {

/**
* Gets the text to display for a node in the tree
*
*
* @param arg0 the node
* @return String
*/
Expand All @@ -335,7 +335,7 @@ public String getText( Object arg0 ) {

/**
* Adds a listener to this label provider
*
*
* @param arg0 the listener
*/
public void addListener( ILabelProviderListener arg0 ) {
Expand All @@ -354,7 +354,7 @@ public void dispose() {
/**
* Returns whether changes to the specified property on the specified element would affect
* the label for the element
*
*
* @param arg0 the element
* @param arg1 the property
* @return boolean
Expand All @@ -365,7 +365,7 @@ public boolean isLabelProperty( Object arg0, String arg1 ) {

/**
* Removes the listener
*
*
* @param arg0 the listener to remove
*/
public void removeListener( ILabelProviderListener arg0 ) {
Expand All @@ -378,7 +378,6 @@ public List<JGrassMapsetGeoResource> getSelectedLayers() {
}

public int getType() {
// TODO Auto-generated method stub
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,31 @@ protected org.eclipse.swt.widgets.Control createDialogArea(
layout.verticalSpacing = 0;
comp.setLayout(layout);
Control msg;
try {
try {
Browser browser = new Browser(comp, SWT.NONE);
browser.setText(String.format(htmlForm,Messages.GetHTMLDriverMsg));
msg = browser;
browser.addLocationListener(new LocationListener() {
msg = browser;
browser.addLocationListener(new LocationListener() {

@Override
public void changing(LocationEvent event) {
event.doit = false;
org.eclipse.swt.program.Program.launch(event.location);

}

@Override
public void changed(LocationEvent event) {
// TODO Auto-generated method stub


}
});
} catch (SWTError e) {
} catch (SWTError e) {
Text text = new Text(comp, SWT.MULTI
| SWT.READ_ONLY | SWT.WRAP | SWT.BORDER
| SWT.SHADOW_IN);
text.setText(Messages.GetDriverMsg);
msg = text;
}
}
GridDataFactory.fillDefaults().span(2, 1)
.hint(500, 200).applyTo(msg);
area(path, JDBC_FILE_NAME, comp);
Expand All @@ -124,7 +123,7 @@ public Text area(String defaultPath,

@Override
public void handleEvent(Event event) {
path = text1.getText();
path = text1.getText();
updateRestart();
}

Expand Down Expand Up @@ -204,7 +203,7 @@ public void start(BundleContext context) throws Exception {

/*
* (non-Javadoc)
*
*
* @see
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
Expand Down Expand Up @@ -232,7 +231,7 @@ public void run() {

File newPlugin;
boolean needUserCopy;

File requiredPluginDir = new File(pluginsDir, pluginName);
try {
newPlugin = requiredPluginDir;
Expand All @@ -246,7 +245,7 @@ public void run() {

final String dest = new File(newPlugin,"libs").getPath();
final File finalNewPlugin = newPlugin;

transfer(dest, JDBC_FILE_NAME, dialog);
transfer(dest, CONFIG_FILE_NAME, dialog);

Expand All @@ -255,25 +254,25 @@ public void run() {
Dialog dialog2 = new Dialog(shell) {
protected Control createDialogArea(Composite parent) {
Control comp;
try {
Browser browser = new Browser(parent, SWT.NONE);

String mainMessage = String.format(Messages.GetHTMLCopyPluginMsg,finalNewPlugin.getParentFile().getAbsolutePath(), finalNewPlugin.getAbsolutePath(), pluginsDir.getAbsolutePath());
browser.setText(mainMessage);
browser.addLocationListener(new LocationListener() {
@Override
public void changing(LocationEvent event) {
event.doit = false;
org.eclipse.swt.program.Program.launch(event.location);
}
@Override
public void changed(LocationEvent event) {
}
});
comp = browser;
} catch (SWTError e) {
try {
Browser browser = new Browser(parent, SWT.NONE);

String mainMessage = String.format(Messages.GetHTMLCopyPluginMsg,finalNewPlugin.getParentFile().getAbsolutePath(), finalNewPlugin.getAbsolutePath(), pluginsDir.getAbsolutePath());
browser.setText(mainMessage);
browser.addLocationListener(new LocationListener() {

@Override
public void changing(LocationEvent event) {
event.doit = false;
org.eclipse.swt.program.Program.launch(event.location);
}

@Override
public void changed(LocationEvent event) {
}
});
comp = browser;
} catch (SWTError e) {
Text text = new Text(parent, SWT.MULTI
| SWT.READ_ONLY | SWT.WRAP | SWT.BORDER
| SWT.SHADOW_IN);
Expand All @@ -282,24 +281,24 @@ public void changed(LocationEvent event) {
text.setText(mainMessage);
comp = text;
}
GridDataFactory.fillDefaults().hint(500, 200).applyTo(comp);
GridDataFactory.fillDefaults().hint(500, 200).applyTo(comp);

return comp;
return comp;
};
@Override
protected Button createButton(Composite parent,
int id, String label, boolean defaultButton) {
Button button = super.createButton(parent, id,label, defaultButton);
if (id == Window.OK) button.setText("Restart");

return button;
}
};

if(dialog2.open() == Window.CANCEL) return;
}
}

String cmd = buildCommandLine(shell);
if (cmd != null) {
System.setProperty(PROP_EXIT_CODE, Integer.toString(24));
Expand All @@ -315,7 +314,7 @@ protected Button createButton(Composite parent,

public File findPluginsDir() throws IOException {
Bundle bundle = Platform.getBundle(GEOTOOLS_LIBS_PLUGIN);

String filePath = FileLocator.toFileURL(FileLocator.find(bundle, new Path("glib"), new HashMap<String, String>())).getFile();
return new File(filePath).getParentFile().getParentFile();
}
Expand All @@ -326,7 +325,7 @@ private void transfer(String dest, String driver, LicenseDialog dialog)
RandomAccessFile in = null;
try {
String fromPath = new File(dialog.getPath(),driver).getPath();

String toPath = new File(dest, driver).getPath();
out = new RandomAccessFile(toPath, "rw");
in = new RandomAccessFile(fromPath.trim(), "r");
Expand Down Expand Up @@ -385,7 +384,7 @@ protected static void createPluginStructure(File newPlugin) throws IOException {
* Create and return a string with command line options for eclipse.exe that
* will launch a new workbench that is the same as the currently running
* one, but using the argument directory as its workspace.
*
*
* @param workspace
* the directory to use as the new workspace
* @return a string of command line options or null on error
Expand Down Expand Up @@ -437,7 +436,7 @@ private static String buildCommandLine(Shell shell) {

/**
* Returns the shared instance
*
*
* @return the shared instance
*/
public static Activator getDefault() {
Expand Down
Loading

0 comments on commit 4468dd6

Please sign in to comment.