本文整理汇总了Java中org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties类的典型用法代码示例。如果您正苦于以下问题:Java JavaBreakpointProperties类的具体用法?Java JavaBreakpointProperties怎么用?Java JavaBreakpointProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JavaBreakpointProperties类属于org.jetbrains.java.debugger.breakpoints.properties包,在下文中一共展示了JavaBreakpointProperties类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getContainingMethod
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
@Nullable
public PsiElement getContainingMethod(@NotNull LineBreakpoint<?> breakpoint) {
SourcePosition position = breakpoint.getSourcePosition();
if (position == null) return null;
JavaBreakpointProperties properties = breakpoint.getProperties();
if (properties instanceof JavaLineBreakpointProperties && !(breakpoint instanceof RunToCursorBreakpoint)) {
Integer ordinal = ((JavaLineBreakpointProperties)properties).getLambdaOrdinal();
if (ordinal > -1) {
List<PsiLambdaExpression> lambdas = DebuggerUtilsEx.collectLambdas(position, true);
if (ordinal < lambdas.size()) {
return lambdas.get(ordinal);
}
}
}
return DebuggerUtilsEx.getContainingMethod(position);
}
示例2: createBreakpoint
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
/**
* Factory method that creates and returns a {@link Breakpoint} from a given
* {@link XBreakpoint}.
*/
public static Breakpoint createBreakpoint(XBreakpoint breakpoint) {
Breakpoint result = new Breakpoint(breakpoint.hashCode(),
BreakpointClassifier.classify(breakpoint));
// Initialize enabled and SuspendPolicy fields.
result.setEnabled(breakpoint.isEnabled());
result.setSuspendPolicy(breakpoint.getSuspendPolicy().ordinal());
// Initialize hit count field.
result.setHitCount(-1);
if (breakpoint.getProperties() instanceof JavaBreakpointProperties) {
JavaBreakpointProperties properties = (JavaBreakpointProperties) breakpoint.getProperties();
if (properties.isCOUNT_FILTER_ENABLED()) {
result.setHitCount(properties.getCOUNT_FILTER());
}
}
// Initialize condition fields if available.
XExpression condition = breakpoint.getConditionExpression();
if (condition != null) {
result.setCondition(condition.getExpression());
result.setConditionEnabled(true);
}
return result;
}
示例3: matchesPosition
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
public boolean matchesPosition(@NotNull LineBreakpoint<?> breakpoint, @NotNull SourcePosition position)
{
JavaBreakpointProperties properties = breakpoint.getProperties();
if(properties instanceof JavaLineBreakpointProperties)
{
if(!(breakpoint instanceof RunToCursorBreakpoint) && ((JavaLineBreakpointProperties) properties).getLambdaOrdinal() == null)
{
return true;
}
PsiElement containingMethod = getContainingMethod(breakpoint);
if(containingMethod == null)
{
return false;
}
return DebuggerUtilsEx.inTheMethod(position, containingMethod);
}
return true;
}
示例4: getContainingMethod
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
@Nullable
public PsiElement getContainingMethod(@NotNull LineBreakpoint<?> breakpoint)
{
SourcePosition position = breakpoint.getSourcePosition();
if(position == null)
{
return null;
}
JavaBreakpointProperties properties = breakpoint.getProperties();
if(properties instanceof JavaLineBreakpointProperties && !(breakpoint instanceof RunToCursorBreakpoint))
{
Integer ordinal = ((JavaLineBreakpointProperties) properties).getLambdaOrdinal();
if(ordinal > -1)
{
List<PsiLambdaExpression> lambdas = DebuggerUtilsEx.collectLambdas(position, true);
if(ordinal < lambdas.size())
{
return lambdas.get(ordinal);
}
}
}
return DebuggerUtilsEx.getContainingMethod(position);
}
示例5: isVisibleOnPopup
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
@Override
public boolean isVisibleOnPopup(@NotNull B breakpoint) {
JavaBreakpointProperties properties = breakpoint.getProperties();
if (properties != null) {
return properties.isCOUNT_FILTER_ENABLED() || properties.isCLASS_FILTERS_ENABLED() || properties.isINSTANCE_FILTERS_ENABLED();
}
return false;
}
示例6: saveTo
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
@Override
public void saveTo(@NotNull B breakpoint) {
JavaBreakpointProperties properties = breakpoint.getProperties();
if (properties == null) {
return;
}
boolean changed = false;
try {
String text = myPassCountField.getText().trim();
int filter = !text.isEmpty() ? Integer.parseInt(text) : 0;
if (filter < 0) filter = 0;
changed = properties.setCOUNT_FILTER(filter);
}
catch (Exception ignored) {
}
changed = properties.setCOUNT_FILTER_ENABLED(properties.getCOUNT_FILTER() > 0 && myPassCountCheckbox.isSelected()) || changed;
reloadInstanceFilters();
reloadClassFilters();
updateInstanceFilterEditor(true);
updateClassFilterEditor(true);
changed = properties.setINSTANCE_FILTERS_ENABLED(myInstanceFiltersField.getText().length() > 0 && myInstanceFiltersCheckBox.isSelected()) || changed;
changed = properties.setCLASS_FILTERS_ENABLED(myClassFiltersField.getText().length() > 0 && myClassFiltersCheckBox.isSelected()) || changed;
changed = properties.setClassFilters(myClassFilters) || changed;
changed = properties.setClassExclusionFilters(myClassExclusionFilters) || changed;
changed = properties.setInstanceFilters(myInstanceFilters) || changed;
if (changed) {
((XBreakpointBase)breakpoint).fireBreakpointChanged();
}
}
示例7: loadFrom
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
@Override
public void loadFrom(@NotNull B breakpoint) {
JavaBreakpointProperties properties = breakpoint.getProperties();
if (properties != null) {
if (properties.getCOUNT_FILTER() > 0) {
myPassCountField.setText(Integer.toString(properties.getCOUNT_FILTER()));
}
else {
myPassCountField.setText("");
}
myPassCountCheckbox.setSelected(properties.isCOUNT_FILTER_ENABLED());
myInstanceFiltersCheckBox.setSelected(properties.isINSTANCE_FILTERS_ENABLED());
myInstanceFiltersField.setEnabled(properties.isINSTANCE_FILTERS_ENABLED());
myInstanceFiltersField.getTextField().setEditable(properties.isINSTANCE_FILTERS_ENABLED());
myInstanceFilters = properties.getInstanceFilters();
updateInstanceFilterEditor(true);
myClassFiltersCheckBox.setSelected(properties.isCLASS_FILTERS_ENABLED());
myClassFiltersField.setEnabled(properties.isCLASS_FILTERS_ENABLED());
myClassFiltersField.getTextField().setEditable(properties.isCLASS_FILTERS_ENABLED());
myClassFilters = properties.getClassFilters();
myClassExclusionFilters = properties.getClassExclusionFilters();
updateClassFilterEditor(true);
XSourcePosition position = breakpoint.getSourcePosition();
// TODO: need to calculate psi class
//myBreakpointPsiClass = breakpoint.getPsiClass();
}
updateCheckboxes();
}
示例8: matchesPosition
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
public boolean matchesPosition(@NotNull LineBreakpoint<?> breakpoint, @NotNull SourcePosition position) {
JavaBreakpointProperties properties = breakpoint.getProperties();
if (properties instanceof JavaLineBreakpointProperties) {
if (!(breakpoint instanceof RunToCursorBreakpoint) && ((JavaLineBreakpointProperties)properties).getLambdaOrdinal() == null) return true;
PsiElement containingMethod = getContainingMethod(breakpoint);
if (containingMethod == null) return false;
return DebuggerUtilsEx.inTheMethod(position, containingMethod);
}
return true;
}
示例9: isVisibleOnPopup
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
@Override
public boolean isVisibleOnPopup(@NotNull B breakpoint)
{
JavaBreakpointProperties properties = breakpoint.getProperties();
if(properties != null)
{
return properties.isCOUNT_FILTER_ENABLED() || properties.isCLASS_FILTERS_ENABLED() || properties.isINSTANCE_FILTERS_ENABLED();
}
return false;
}
示例10: loadFrom
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
@Override
public void loadFrom(@NotNull B breakpoint)
{
JavaBreakpointProperties properties = breakpoint.getProperties();
if(properties != null)
{
if(properties.getCOUNT_FILTER() > 0)
{
myPassCountField.setText(Integer.toString(properties.getCOUNT_FILTER()));
}
else
{
myPassCountField.setText("");
}
myPassCountCheckbox.setSelected(properties.isCOUNT_FILTER_ENABLED());
myInstanceFiltersCheckBox.setSelected(properties.isINSTANCE_FILTERS_ENABLED());
myInstanceFiltersField.setEnabled(properties.isINSTANCE_FILTERS_ENABLED());
myInstanceFiltersField.getTextField().setEditable(properties.isINSTANCE_FILTERS_ENABLED());
myInstanceFilters = properties.getInstanceFilters();
updateInstanceFilterEditor(true);
myClassFiltersCheckBox.setSelected(properties.isCLASS_FILTERS_ENABLED());
myClassFiltersField.setEnabled(properties.isCLASS_FILTERS_ENABLED());
myClassFiltersField.getTextField().setEditable(properties.isCLASS_FILTERS_ENABLED());
myClassFilters = properties.getClassFilters();
myClassExclusionFilters = properties.getClassExclusionFilters();
updateClassFilterEditor(true);
XSourcePosition position = breakpoint.getSourcePosition();
// TODO: need to calculate psi class
//myBreakpointPsiClass = breakpoint.getPsiClass();
}
updateCheckboxes();
}
示例11: saveTo
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties; //导入依赖的package包/类
@Override
public void saveTo(@NotNull B breakpoint)
{
JavaBreakpointProperties properties = breakpoint.getProperties();
if(properties == null)
{
return;
}
boolean changed = false;
try
{
String text = myPassCountField.getText().trim();
int filter = !text.isEmpty() ? Integer.parseInt(text) : 0;
if(filter < 0)
{
filter = 0;
}
changed = properties.setCOUNT_FILTER(filter);
}
catch(Exception ignored)
{
}
changed = properties.setCOUNT_FILTER_ENABLED(properties.getCOUNT_FILTER() > 0 && myPassCountCheckbox.isSelected()) || changed;
reloadInstanceFilters();
reloadClassFilters();
updateInstanceFilterEditor(true);
updateClassFilterEditor(true);
changed = properties.setINSTANCE_FILTERS_ENABLED(myInstanceFiltersField.getText().length() > 0 && myInstanceFiltersCheckBox.isSelected()) ||
changed;
changed = properties.setCLASS_FILTERS_ENABLED(myClassFiltersField.getText().length() > 0 && myClassFiltersCheckBox.isSelected()) || changed;
changed = properties.setClassFilters(myClassFilters) || changed;
changed = properties.setClassExclusionFilters(myClassExclusionFilters) || changed;
changed = properties.setInstanceFilters(myInstanceFilters) || changed;
if(changed)
{
((XBreakpointBase) breakpoint).fireBreakpointChanged();
}
}