/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import com.intellij.execution.util.ExecUtil;
import com.intellij.ide.DataManager;
import com.intellij.ide.IdeBundle;
+import com.intellij.notification.Notification;
+import com.intellij.notification.NotificationListener;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
+import javax.swing.event.HyperlinkEvent;
import javax.swing.filechooser.FileSystemView;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ShowFilePathAction extends AnAction {
private static final Logger LOG = Logger.getInstance("#com.intellij.ide.actions.ShowFilePathAction");
+ public static final NotificationListener FILE_SELECTING_LISTENER = new NotificationListener.Adapter() {
+ @Override
+ protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent e) {
+ URL url = e.getURL();
+ if (url != null) openFile(new File(url.getPath()));
+ notification.expire();
+ }
+ };
+
private static NotNullLazyValue<Boolean> canUseNautilus = new NotNullLazyValue<Boolean>() {
@NotNull
@Override
action.CaptureMemorySnapShot.description=Capture memory snapshot
action.CaptureCPUUsageData.text=Start CPU Usage Profiling
action.CaptureCPUUsageData.description=Capture CPU usage data
+stop.capture.cpu.usage.data.action.name=Stop CPU Usage Profiling
action.CaptureAllocations.text=Capture Allocations
action.CaptureAllocations.description=Capture memory allocations data
+stop.capture.allocations.data.action.name=Stop Capturing Allocations
action.ContextHelp.text=Conte_xt Help
action.ContextHelp.description=Show context help
action.RunConfiguration.text=Select Run/Debug Configuration
group.ShowRecentFindUsagesGroup.text=Recent Find Usages
group.ShowRecentFindUsagesGroup.description=Choose and re-run recent find usages
-stop.capture.cpu.usage.data.action.name=Stop CPU Usage Profiling
-stop.capture.cpu.usage.data.action.description=Stop capturing CPU usage data
-stop.capture.allocations.usage.data.action.name=Capture allocations data, now capturing
-stop.capture.allocations.usage.data.action.description=Stop capturing allocations data
-
action.IntegrateFiles.text=Integrate
action.IntegrateFiles.description=Integrate selected files or directories
action.Vcs.IntegrateProject.text=Inte_grate Project
format.file.size.kbytes={0}Kb
format.file.size.mbytes={0}Mb
-profiling.captured.cpu.snapshot.message.text=Captured CPU snapshot: ''{0}'' is placed in user home directory.
-profiling.captured.allocations.snapshot.message.text=Captured allocations snapshot: ''{0}'' is placed in user home directory.
-information.dialog.title=Information
-captured.memory.snapshot.placed.in.user.home.directory.message.text=Captured memory snapshot: ''{0}'' is placed in user home directory.
+profiling.capture.snapshot.success=Captured snapshot ''{0}'' is placed in user home directory. <a href="{1}">Show in {2}</a>.
+profiling.capture.snapshot.error=Failed to capture snapshot: {0}
cannot.undo.dialog.title=Cannot Undo
cannot.undo.error.other.affected.files.changed.message=Following files affected by this action have been already changed: