Skip to content

Commit

Permalink
feat: Remove unused GET_ENTITY_TEXT_LOCATIONS command
Browse files Browse the repository at this point in the history
  • Loading branch information
travisstebbins committed Dec 5, 2024
1 parent e1970f6 commit d16b712
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions src/utils/Const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,13 @@ export const GET_SUBTYPE_INFO_REQUEST_ID = 'legend/getSubtypeInfo';

// Event Types
export const GET_PROJECT_ENTITIES = 'getProjectEntities';
export const GET_ENTITY_TEXT_LOCATIONS = 'getEntityTextLocations';
export const DIAGRAM_DROP_CLASS_ERROR = 'diagramDropClassError';
export const WRITE_ENTITY = 'writeEntity';
export const QUERY_BUILDER_CONFIG_ERROR = 'queryBuilderConfigError';
export const EXPORT_DATA_COMMAND_ID = 'legend.query.exportData';

// Response events
export const GET_PROJECT_ENTITIES_RESPONSE = `${GET_PROJECT_ENTITIES}/response`;
export const GET_ENTITY_TEXT_LOCATIONS_RESPONSE = `${GET_ENTITY_TEXT_LOCATIONS}/response`;
export const GET_CURRENT_USER_ID_RESPONSE = `${GET_CURRENT_USER_ID_REQUEST_ID}/response`;
export const GET_CLASSIFIER_PATH_MAP_RESPONSE = `${GET_CLASSIFIER_PATH_MAP_REQUEST_ID}/response`;
export const GET_SUBTYPE_INFO_RESPONSE = `${GET_SUBTYPE_INFO_REQUEST_ID}/response`;
Expand Down
20 changes: 0 additions & 20 deletions src/webviews/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ import {
GET_CLASSIFIER_PATH_MAP_RESPONSE,
GET_CURRENT_USER_ID_REQUEST_ID,
GET_CURRENT_USER_ID_RESPONSE,
GET_ENTITY_TEXT_LOCATIONS,
GET_ENTITY_TEXT_LOCATIONS_RESPONSE,
GET_LAMBDA_RETURN_TYPE_COMMAND_ID,
GET_LAMBDA_RETURN_TYPE_RESPONSE,
GET_PROJECT_ENTITIES,
Expand All @@ -65,7 +63,6 @@ import {
import { type LegendConceptTreeProvider } from '../conceptTree';
import { guaranteeNonNullable } from '../utils/AssertionUtils';
import { TextLocation } from '../model/TextLocation';
import { locationToTextLocation } from '../utils/TextLocationUtils';
import { TextDocumentIdentifier } from 'vscode-languageclient';

export const getWebviewHtml = (
Expand Down Expand Up @@ -416,23 +413,6 @@ export const handleQueryBuilderWebviewMessage = async (
?.save();
return true;
}
case GET_ENTITY_TEXT_LOCATIONS: {
const result = message.msg.entityIds
.map(
(entityId: string) =>
legendConceptTree.getTreeItemById(entityId)?.location,
)
.filter(
(location: Location | undefined) =>
location !== null && location !== undefined,
)
.map((location: Location) => locationToTextLocation(location));
webview.postMessage({
command: GET_ENTITY_TEXT_LOCATIONS_RESPONSE,
result,
});
return true;
}
case QUERY_BUILDER_CONFIG_ERROR: {
window.showErrorMessage('Error setting up Query Builder', {
modal: true,
Expand Down

0 comments on commit d16b712

Please sign in to comment.