use of com.facebook.buck.intellij.ideabuck.ui.tree.BuckTreeNodeDetail in project buck by facebook.
the class BuckEventsConsumer method consumeParseRuleStart.
@Override
public void consumeParseRuleStart(long timestamp) {
mParseFilesStartTimestamp = timestamp;
// start may be called before of after progress update
if (BuckEventsConsumer.this.mParseProgress == null) {
BuckEventsConsumer.this.mParseProgress = new BuckTreeNodeDetail(mCurrentBuildRootElement, BuckTreeNodeDetail.DetailType.INFO, "Current file parsing progress: " + Math.round(mParseProgressValue * 100) + "%");
BuckEventsConsumer.this.mCurrentBuildRootElement.addChild(mParseProgress);
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
BuckEventsConsumer.this.mTreeModel.reload();
}
});
}
}
use of com.facebook.buck.intellij.ideabuck.ui.tree.BuckTreeNodeDetail in project buck by facebook.
the class BuckEventsConsumer method consumeBuildStart.
@Override
public void consumeBuildStart(long timestamp) {
mMainBuildStartTimestamp = timestamp;
if (BuckEventsConsumer.this.mBuildProgress == null) {
BuckEventsConsumer.this.mBuildProgress = new BuckTreeNodeDetail(BuckEventsConsumer.this.mCurrentBuildRootElement, BuckTreeNodeDetail.DetailType.INFO, "Current build progress: " + Math.round(mBuildProgressValue * 100) + "%");
// start may be called before of after progress update
BuckEventsConsumer.this.mCurrentBuildRootElement.addChild(mBuildProgress);
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
BuckEventsConsumer.this.mTreeModel.reload();
}
});
}
}
use of com.facebook.buck.intellij.ideabuck.ui.tree.BuckTreeNodeDetail in project buck by facebook.
the class DetailNodeRenderer method render.
@Override
public Component render(Object value) {
BuckTreeNodeDetail node = (BuckTreeNodeDetail) value;
Icon icon = AllIcons.Ide.Info_notifications;
if (node.getType() == BuckTreeNodeDetail.DetailType.ERROR) {
icon = AllIcons.Ide.Error;
} else if (node.getType() == BuckTreeNodeDetail.DetailType.WARNING) {
icon = AllIcons.Ide.Warning_notifications;
}
String message = "<html><pre style='margin:0px'>" + HtmlEscapers.htmlEscaper().escape(node.getDetail()) + "</pre></html>";
JBLabel result = new JBLabel(message, icon, SwingConstants.HORIZONTAL);
result.setToolTipText("<pre>" + node.getDetail() + "</pre>");
return result;
}
use of com.facebook.buck.intellij.ideabuck.ui.tree.BuckTreeNodeDetail in project buck by facebook.
the class FileErrorNodeRenderer method render.
@Override
public Component render(Object value) {
JBLabel result = new JBLabel(((BuckTreeNodeFileError) value).getFilePath(), AllIcons.Ide.Warning_notifications, SwingConstants.HORIZONTAL);
BuckTreeNodeFileError buckNode = (BuckTreeNodeFileError) value;
for (int i = 0; i < buckNode.getChildCount(); i++) {
BuckTreeNodeDetail childNode = (BuckTreeNodeDetail) buckNode.getChildAt(i);
if (childNode.getType() == BuckTreeNodeDetail.DetailType.ERROR) {
result.setIcon(AllIcons.Ide.Error);
result.setForeground(Color.RED);
break;
}
}
return result;
}
Aggregations