mirror of https://github.com/mchr3k/org.intrace
- Add NPE to class analysis
- Add better tab styling of include/exclude window
This commit is contained in:
parent
44201c60d0
commit
4f29676544
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -139,8 +139,16 @@ public class ClassAnalysis extends EmptyVisitor
|
|||
{
|
||||
if (currentMethod_numArgs > 0)
|
||||
{
|
||||
methodArgNames.get(currentMethod_sig).add(name);
|
||||
currentMethod_numArgs--;
|
||||
List<String> args = methodArgNames.get(currentMethod_sig);
|
||||
|
||||
if (args != null)
|
||||
{
|
||||
// Do this in a null check block because we hit
|
||||
// an NPE here once. This shouldn't be possible
|
||||
// but this null check will avoid any problems.
|
||||
args.add(name);
|
||||
currentMethod_numArgs--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -411,6 +411,7 @@ public class InTraceUI implements ISocketCallback, IControlConnectionListener
|
|||
{
|
||||
IncludeExcludeWindow regexInput = new IncludeExcludeWindow(
|
||||
"Classes to Instrument", helpText, mode,
|
||||
modeData,
|
||||
new PatternInputCallback()
|
||||
{
|
||||
private List<String> includePattern = null;
|
||||
|
|
@ -1404,6 +1405,7 @@ public class InTraceUI implements ISocketCallback, IControlConnectionListener
|
|||
{
|
||||
IncludeExcludeWindow regexInput;
|
||||
regexInput = new IncludeExcludeWindow("Output Filter", helpText, mode,
|
||||
modeData,
|
||||
patternCallback, lastEnteredIncludeFilterPattern,
|
||||
lastEnteredExcludeFilterPattern, ALLOW_ALL);
|
||||
placeDialogInCenter(sWindow.getBounds(), regexInput.sWindow);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import org.eclipse.swt.events.MouseEvent;
|
|||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.VerifyEvent;
|
||||
import org.eclipse.swt.events.VerifyListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
|
|
@ -28,6 +29,7 @@ import org.eclipse.swt.widgets.TabFolder;
|
|||
import org.eclipse.swt.widgets.TabItem;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.intrace.client.gui.helper.InTraceUI.UIMode;
|
||||
import org.intrace.client.gui.helper.InTraceUI.UIModeData;
|
||||
|
||||
public class IncludeExcludeWindow
|
||||
{
|
||||
|
|
@ -44,13 +46,17 @@ public class IncludeExcludeWindow
|
|||
|
||||
private final Pattern allowedStrings;
|
||||
|
||||
private final UIModeData modedata;
|
||||
|
||||
public IncludeExcludeWindow(String windowTitle, String helpText,
|
||||
UIMode mode,
|
||||
UIModeData modedata,
|
||||
PatternInputCallback callback,
|
||||
java.util.List<String> initIncludePatterns,
|
||||
java.util.List<String> initExcludePatterns,
|
||||
Pattern allowedStrings)
|
||||
{
|
||||
this.modedata = modedata;
|
||||
this.callback = callback;
|
||||
this.allowedStrings = allowedStrings;
|
||||
MigLayout windowLayout = new MigLayout("fill", "[grow][100][100][grow]",
|
||||
|
|
@ -105,6 +111,13 @@ public class IncludeExcludeWindow
|
|||
ctabs.setLayoutData("grow,wrap,wmin 0,spanx 4");
|
||||
fillCTabs(ctabs, initIncludePatterns, initExcludePatterns, helpText);
|
||||
ctabs.setSelection(0);
|
||||
if (this.modedata != null)
|
||||
{
|
||||
ctabs.setSelectionBackground(
|
||||
new Color[]{this.modedata.colorOne,
|
||||
this.modedata.colorTwo},
|
||||
new int[]{100}, true);
|
||||
}
|
||||
}
|
||||
|
||||
saveCancelButtons = new SaveCancelButtons(sWindow);
|
||||
|
|
|
|||
Loading…
Reference in New Issue