X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/actions/RefreshBookmarkAction.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/actions/RefreshBookmarkAction.java new file mode 100644 index 0000000..525503f --- /dev/null +++ b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/actions/RefreshBookmarkAction.java @@ -0,0 +1,37 @@ +package com.quantum.actions; + +import java.util.Iterator; +import java.util.List; + +import com.quantum.Messages; +import com.quantum.QuantumPlugin; +import com.quantum.sql.SQLHelper; +import com.quantum.view.bookmark.BookmarkView; +import com.quantum.view.bookmark.TreeNode; + +import org.eclipse.ui.IViewPart; +import org.eclipse.ui.actions.SelectionListenerAction; + +/** + * @author root + */ +public class RefreshBookmarkAction extends SelectionListenerAction { + SQLHelper helper = new SQLHelper(); + + BookmarkView view; + public RefreshBookmarkAction(IViewPart view) { + super(Messages.getString(RefreshBookmarkAction.class.getName() + ".text")); + this.view = (BookmarkView) view; + setImageDescriptor(QuantumPlugin.getImageDescriptor("refresh.gif")); + } + + public void run() { + List list = getSelectedNonResources(); + for (Iterator i = list.iterator(); i.hasNext(); ) { + Object object = i.next(); + if (object != null && object instanceof TreeNode) { + ((TreeNode) object).reload(); + } + } + } +}