mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-22 15:53:58 +02:00
output interpretation fixes for local shell
This commit is contained in:
parent
7eefb61774
commit
a3d78eb154
4 changed files with 31 additions and 11 deletions
|
@ -96,10 +96,11 @@ command: .*bat\s.*
|
||||||
error file line pattern=file:([\w,.,/,\\,:]*):(\d*):.*
|
error file line pattern=file:([\w,.,/,\\,:]*):(\d*):.*
|
||||||
|
|
||||||
command: dir.*
|
command: dir.*
|
||||||
directory file pattern=\d{2}/\d{2}/\d*\s\d{2}:\d{2}[a,p,AM,PM,\s].*\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+\+,\d]*).*
|
directory file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
|
||||||
file file pattern=\d{2}/\d{2}/\d*\s\d{2}:\d{2}[a,p,AM,PM,\s].*\s*[\d,,]* ([\w,.,/,\\,\s,\-,\+\+,\d]*).*
|
directory file pattern=.*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
|
||||||
directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+\+,\d]*)
|
file file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*[\d,,]*\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
|
||||||
file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\w,.,/,\\,\s,\-,\+\+,\d]*)
|
directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*)
|
||||||
|
file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\w,.,/,\\,\s,\-,\+,\d]*)
|
||||||
|
|
||||||
command: ls -l.*
|
command: ls -l.*
|
||||||
file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)
|
file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)
|
||||||
|
|
|
@ -96,10 +96,11 @@ command: .*bat\s.*
|
||||||
error file line pattern=file:([\w,.,/,\\,:]*):(\d*):.*
|
error file line pattern=file:([\w,.,/,\\,:]*):(\d*):.*
|
||||||
|
|
||||||
command: dir.*
|
command: dir.*
|
||||||
directory file pattern=\d{2}/\d{2}/\d*\s\d{2}:\d{2}[a,p,AM,PM,\s].*\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+\+,\d]*).*
|
directory file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
|
||||||
file file pattern=\d{2}/\d{2}/\d*\s\d{2}:\d{2}[a,p,AM,PM,\s].*\s*[\d,,]* ([\w,.,/,\\,\s,\-,\+\+,\d]*).*
|
directory file pattern=.*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
|
||||||
directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+\+,\d]*)
|
file file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*[\d,,]*\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
|
||||||
file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\w,.,/,\\,\s,\-,\+\+,\d]*)
|
directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*)
|
||||||
|
file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\w,.,/,\\,\s,\-,\+,\d]*)
|
||||||
|
|
||||||
command: ls -l.*
|
command: ls -l.*
|
||||||
file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)
|
file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)
|
||||||
|
|
|
@ -129,7 +129,8 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemOutpu
|
||||||
if (firstSelection instanceof IRemoteLineReference)
|
if (firstSelection instanceof IRemoteLineReference)
|
||||||
{
|
{
|
||||||
IRemoteOutput result = (IRemoteOutput) firstSelection;
|
IRemoteOutput result = (IRemoteOutput) firstSelection;
|
||||||
if (result.getType().equals("prompt"))
|
String type = result.getType();
|
||||||
|
if (type.equals("prompt"))
|
||||||
{
|
{
|
||||||
if (_pasteToPromptAction == null)
|
if (_pasteToPromptAction == null)
|
||||||
{
|
{
|
||||||
|
@ -138,6 +139,15 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemOutpu
|
||||||
|
|
||||||
menu.add(menuGroup, _pasteToPromptAction);
|
menu.add(menuGroup, _pasteToPromptAction);
|
||||||
}
|
}
|
||||||
|
else if (type.equals("directory"))
|
||||||
|
{
|
||||||
|
IRemoteOutput output = (IRemoteOutput)firstSelection;
|
||||||
|
if (output.getAbsolutePath() != null)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
// add directory actions here
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IRemoteOutput output = (IRemoteOutput)firstSelection;
|
IRemoteOutput output = (IRemoteOutput)firstSelection;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package org.eclipse.rse.subsystems.shells.local.model;
|
package org.eclipse.rse.subsystems.shells.local.model;
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.rse.internal.services.local.shells.ParsedOutput;
|
import org.eclipse.rse.internal.services.local.shells.ParsedOutput;
|
||||||
import org.eclipse.rse.internal.services.local.shells.Patterns;
|
import org.eclipse.rse.internal.services.local.shells.Patterns;
|
||||||
|
@ -98,9 +100,15 @@ public class LocalServiceCommandShell extends ServiceCommandShell
|
||||||
_workingDir = file;
|
_workingDir = file;
|
||||||
output.setAbsolutePath(_workingDir);
|
output.setAbsolutePath(_workingDir);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
else if (type.equals("file") || type.equals("directory"))
|
||||||
|
{
|
||||||
|
output.setAbsolutePath(parsedMsg.file);
|
||||||
|
}
|
||||||
|
*/
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
output.setAbsolutePath(_workingDir + "\\" + file);
|
output.setAbsolutePath(_workingDir + File.separatorChar + file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue