Skip to content

Commit

Permalink
#11 - Add notification that the path was copied successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris2011 committed Jun 18, 2024
1 parent 121d69e commit fd65e2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

### Features
1 - [#9](https://github.com/Chris2011/NetBeans-Breadcrumb-Explorer/issues/9): Add new context menu for filename for the same actions as for folders.
2 - [#12](https://github.com/Chris2011/NetBeans-Breadcrumb-Explorer/issues/12): Please remove the indentations.
2 - [#11](https://github.com/Chris2011/NetBeans-Breadcrumb-Explorer/issues/11): Add notifiction that the path was copied
3 - [#12](https://github.com/Chris2011/NetBeans-Breadcrumb-Explorer/issues/12): Please remove the indentations.

## Update in 1.3.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import javax.swing.Action;
import javax.swing.ActionMap;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.InputMap;
import javax.swing.JButton;
import javax.swing.JComponent;
Expand All @@ -48,6 +49,8 @@
import org.netbeans.api.editor.mimelookup.MimePath;
import org.netbeans.modules.editor.NbEditorUtilities;
import org.openide.awt.CloseButtonFactory;
import org.openide.awt.Notification;
import org.openide.awt.NotificationDisplayer;
import org.openide.cookies.OpenCookie;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;
Expand Down Expand Up @@ -250,6 +253,8 @@ public void mouseExited(MouseEvent e) {

private void copyPath(String path) {
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(path), null);

NotificationDisplayer.getDefault().notify("Path copied", NotificationDisplayer.Priority.NORMAL.getIcon(), "Path copied successfully", null);
}

private void openContainingFolder(String absolutePath) {
Expand Down

0 comments on commit fd65e2e

Please sign in to comment.