Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
takezoe committed Jul 7, 2024
1 parent 611b217 commit 1ea91f9
Show file tree
Hide file tree
Showing 30 changed files with 393 additions and 428 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,13 @@ private boolean savePreviouslyNeeded() {
* @param icon the icon path
* @return created <code>PaletteEntry</code>
*/
private PaletteEntry createConnectionEntry(String itemName, Class<?> clazz, String icon){
private <T> PaletteEntry createConnectionEntry(String itemName, Class<T> clazz, String icon){
ImageDescriptor image = null;
if(icon!=null){
image = DBPlugin.getImageDescriptor(icon);
}
ConnectionCreationToolEntry entry = new ConnectionCreationToolEntry(
itemName, itemName, new SimpleFactory(clazz), image, image);
itemName, itemName, new SimpleFactory<T>(clazz), image, image);
return entry;
}

Expand All @@ -400,13 +400,13 @@ private PaletteEntry createConnectionEntry(String itemName, Class<?> clazz, Stri
* @param icon the icon path
* @return created <code>PaletteEntry</code>
*/
private PaletteEntry createEntityEntry(String itemName,Class<?> clazz,String icon){
private <T> PaletteEntry createEntityEntry(String itemName,Class<T> clazz,String icon){
ImageDescriptor image = null;
if(icon!=null){
image = DBPlugin.getImageDescriptor(icon);
}
CreationToolEntry entry = new CreationToolEntry(
itemName, itemName, new SimpleFactory(clazz), image, image);
itemName, itemName, new SimpleFactory<T>(clazz), image, image);

return entry;
}
Expand All @@ -426,7 +426,7 @@ private void refreshGraphicalViewer() {
IFile file = ((IFileEditorInput) input).getFile();
GraphicalViewer viewer = getGraphicalViewer();

// desirialize
// deserialize
RootModel newRoot = null;
try {
newRoot = VisualDBSerializer.deserialize(file.getContents());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.java.amateras.db.visual.editpart;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import net.java.amateras.db.visual.model.TableModel;

import org.eclipse.gef.TreeEditPart;
import org.eclipse.gef.editparts.AbstractEditPart;
import org.eclipse.jface.resource.CompositeImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
Expand Down
Loading

0 comments on commit 1ea91f9

Please sign in to comment.