Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return;
let secLocPropList;
const where = [...modelIds].join(",");
const ecsql = "SELECT ECInstanceId as id FROM BisCore.SectionLocation WHERE Model.Id IN (" + where + ")";
try {
const secLocIds: Id64Array = [];
for await (const row of vp.view.iModel.query(ecsql))
secLocIds.push(row.id);
if (0 !== secLocIds.length)
secLocPropList = await vp.view.iModel.elements.getProps(secLocIds) as SectionLocationProps[];
} catch (_) { }
if (undefined === secLocPropList || 0 === secLocPropList.length) {
const msg = HyperModelingPlugin.plugin.i18n.translate("HyperModeling:Error.NotFoundModels");
IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, msg, undefined, OutputMessageType.Toast));
return;
}
// Start by creating the decoration object and adding it as a ViewManager decorator.
SectionLocationSetDecoration.decorator = new SectionLocationSetDecoration(vp, sectionMarkerImage);
SectionLocationSetDecoration.decorator._detailMarkerImage = await this.loadImage(HyperModelingPlugin.plugin.resolveResourceUrl("detailmarkersprite.ico"));
SectionLocationSetDecoration.decorator._elevationMarkerImage = await this.loadImage(HyperModelingPlugin.plugin.resolveResourceUrl("elevationmarkersprite.ico"));
SectionLocationSetDecoration.decorator._planMarkerImage = await this.loadImage(HyperModelingPlugin.plugin.resolveResourceUrl("planmarkersprite.ico"));
SectionLocationSetDecoration.decorator.createMarkers(secLocPropList);
if (0 === SectionLocationSetDecoration.decorator._sectionLocations.markers.size) {
const msg = HyperModelingPlugin.plugin.i18n.translate("HyperModeling:Error.NotFoundModels");
IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, msg, undefined, OutputMessageType.Toast));
return;
}
private _onKeyPress = (e: React.KeyboardEvent) => {
if (e.key === "Escape") {
e.preventDefault();
e.stopPropagation();
this._resetToOriginalValue();
}
if (e.key !== "Enter") {
// istanbul ignore next
if (IModelApp.notifications)
IModelApp.notifications.closeInputFieldMessage();
}
}
() => IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "Menu item clicked")),
);
private showInfoFromCursorMenu(label: string) {
const msg = `Context Menu selection - ${label}`;
IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, msg));
}
execute: () => IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, "This is a warning message", this._detailedMessage, OutputMessageType.Sticky)),
});
const outputMessage = async (msg: string) => {
await IModelApp.notifications.openMessageBox(MessageBoxType.MediumAlert, msg, MessageBoxIconType.Warning);
this.focus();
};
public async showMarkers(): Promise {
if (!this._markers) {
this._markers = new GeoPhotoMarkerManager(this.plugin, this);
}
const message: string = this.plugin.i18n.translate("geoPhoto:messages.ShowingMarkers");
const msgDetails: NotifyMessageDetails = new NotifyMessageDetails(OutputMessagePriority.Info, message);
IModelApp.notifications.outputMessage(msgDetails);
return this._markers.startDecorating();
}
let curLine = 0;
for (const line of lines) {
appendText(line);
if (++curLine > maxLines) {
appendText("...");
break;
}
}
await IModelApp.notifications.openMessageBox(MessageBoxType.Ok, div, MessageBoxIconType.Information);
}
} catch (err) {
messageDetails = new NotifyMessageDetails(OutputMessagePriority.Error, "Error occurred while generating summary", err.toString());
}
IModelApp.notifications.outputMessage(messageDetails);
}