Skip to content

Commit 46f6e05

Browse files
committed
Delete all the things
1 parent 35cecd5 commit 46f6e05

File tree

80 files changed

+244
-7759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+244
-7759
lines changed

dist/hyperclickProvider.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"use strict";
2-
var parent = require("./worker/parent");
3-
var atomUtils = require("./main/atom/atomUtils");
42
var immutable_1 = require("immutable");
53
var TS_GRAMMARS = immutable_1.Set(["source.ts", "source.tsx"]);
64
exports.providerName = "typescript-hyperclick-provider";
@@ -12,19 +10,6 @@ function getSuggestionForWord(textEditor, text, range) {
1210
return {
1311
range: range,
1412
callback: function () {
15-
var filePathPosition = {
16-
filePath: textEditor.getPath(),
17-
position: atomUtils.getEditorPositionForBufferPosition(textEditor, range.start)
18-
};
19-
parent.getDefinitionsAtPosition(filePathPosition).then(function (res) {
20-
if (res.definitions.length > 0) {
21-
var definition = res.definitions[0];
22-
atom.workspace.open(definition.filePath, {
23-
initialLine: definition.position.line,
24-
initialColumn: definition.position.col
25-
});
26-
}
27-
});
2813
}
2914
};
3015
}

dist/main/atom/atomConfig.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ function setConfig(nameLambda, value) {
1010
var Config = (function () {
1111
function Config() {
1212
this.schema = {
13-
debugAtomTs: {
14-
title: 'Debug: Atom-TypeScript. Please do not use.',
15-
type: 'boolean',
16-
default: false
17-
},
1813
preferredQuoteCharacter: {
1914
title: 'Preferred quote character',
2015
type: 'string',
@@ -32,14 +27,6 @@ var Config = (function () {
3227
}
3328
};
3429
}
35-
Object.defineProperty(Config.prototype, "debugAtomTs", {
36-
get: function () {
37-
var _this = this;
38-
return getConfig(function () { return _this.schema.debugAtomTs; });
39-
},
40-
enumerable: true,
41-
configurable: true
42-
});
4330
Object.defineProperty(Config.prototype, "preferredQuoteCharacter", {
4431
get: function () {
4532
var _this = this;

dist/main/atom/atomUtils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ function getEditorsForAllPaths(filePaths) {
8989
}
9090
exports.getEditorsForAllPaths = getEditorsForAllPaths;
9191
function getRangeForTextSpan(editor, ts) {
92-
var buffer = editor.buffer;
9392
var start = editor.buffer.positionForCharacterIndex(ts.start);
9493
var end = editor.buffer.positionForCharacterIndex(ts.start + ts.length);
9594
var range = new _atom.Range(start, end);

dist/main/atom/autoCompleteProvider.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@ function triggerAutocompletePlus() {
99
explicitlyTriggered = true;
1010
}
1111
exports.triggerAutocompletePlus = triggerAutocompletePlus;
12-
function getModuleAutocompleteType(scopes) {
13-
function has(match) {
14-
return scopes.some(function (scope) { return scope.indexOf(match) !== -1; });
15-
}
16-
var isString = has('string.quoted');
17-
return {
18-
isReference: has('reference.path.string.quoted') || has('amd.path.string.quoted'),
19-
isRequire: has('meta.import-equals.external') && isString,
20-
isImport: has('meta.import') && isString
21-
};
22-
}
2312
exports.provider = {
2413
selector: '.source.ts, .source.tsx',
2514
inclusionPriority: 3,

dist/main/atom/commands/commands.js

Lines changed: 0 additions & 229 deletions
Original file line numberDiff line numberDiff line change
@@ -5,94 +5,12 @@ function __export(m) {
55
var parent = require("../../../worker/parent");
66
var atomUtils = require("../atomUtils");
77
var autoCompleteProvider = require("../autoCompleteProvider");
8-
var path = require("path");
9-
var renameView = require("../views/renameView");
108
var contextView = require("../views/contextView");
11-
var fileSymbolsView = require("../views/fileSymbolsView");
12-
var projectSymbolsView = require("../views/projectSymbolsView");
139
var typeOverlayView_1 = require("../views/typeOverlayView");
1410
var gotoHistory = require("../gotoHistory");
15-
var utils = require("../../lang/utils");
1611
var mainPanelView_1 = require("../views/mainPanelView");
17-
var astView_1 = require("../views/astView");
18-
var dependencyView_1 = require("../views/dependencyView");
19-
var simpleSelectionView_1 = require("../views/simpleSelectionView");
20-
var escapeHtml = require("escape-html");
21-
var json2dtsCommands_1 = require("./json2dtsCommands");
2212
__export(require("../components/componentRegistry"));
2313
function registerCommands() {
24-
json2dtsCommands_1.registerJson2dtsCommands();
25-
atom.commands.add('atom-text-editor', 'typescript:format-code', function (e) {
26-
if (!atomUtils.commandForTypeScript(e))
27-
return;
28-
var editor = atom.workspace.getActiveTextEditor();
29-
var filePath = editor.getPath();
30-
var selection = editor.getSelectedBufferRange();
31-
if (selection.isEmpty()) {
32-
parent.formatDocument({ filePath: filePath }).then(function (result) {
33-
if (!result.edits.length)
34-
return;
35-
editor.transact(function () {
36-
atomUtils.formatCode(editor, result.edits);
37-
});
38-
});
39-
}
40-
else {
41-
parent.formatDocumentRange({ filePath: filePath, start: { line: selection.start.row, col: selection.start.column }, end: { line: selection.end.row, col: selection.end.column } }).then(function (result) {
42-
if (!result.edits.length)
43-
return;
44-
editor.transact(function () {
45-
atomUtils.formatCode(editor, result.edits);
46-
});
47-
});
48-
}
49-
});
50-
var handleGoToDeclaration = function (e) {
51-
if (!atomUtils.commandForTypeScript(e))
52-
return;
53-
parent.getDefinitionsAtPosition(atomUtils.getFilePathPosition()).then(function (res) {
54-
var definitions = res.definitions;
55-
if (!definitions || !definitions.length) {
56-
atom.notifications.addInfo('AtomTS: No definition found.');
57-
return;
58-
}
59-
if (definitions.length > 1) {
60-
simpleSelectionView_1.simpleSelectionView({
61-
items: definitions,
62-
viewForItem: function (item) {
63-
return "\n <span>" + item.filePath + "</span>\n <div class=\"pull-right\">line: " + item.position.line + "</div>\n ";
64-
},
65-
filterKey: 'filePath',
66-
confirmed: function (definition) {
67-
atom.workspace.open(definition.filePath, {
68-
initialLine: definition.position.line,
69-
initialColumn: definition.position.col
70-
});
71-
}
72-
});
73-
}
74-
else {
75-
var definition = definitions[0];
76-
atom.workspace.open(definition.filePath, {
77-
initialLine: definition.position.line,
78-
initialColumn: definition.position.col
79-
});
80-
}
81-
});
82-
};
83-
atom.commands.add('atom-workspace', 'typescript:go-to-declaration', handleGoToDeclaration);
84-
atom.commands.add('atom-text-editor', 'symbols-view:go-to-declaration', handleGoToDeclaration);
85-
atom.commands.add('atom-workspace', 'typescript:create-tsconfig.json-project-file', function (e) {
86-
if (!atomUtils.commandForTypeScript(e))
87-
return;
88-
var editor = atom.workspace.getActiveTextEditor();
89-
var filePath = editor.getPath();
90-
parent.createProject({ filePath: filePath }).then(function (res) {
91-
if (res.createdFilePath) {
92-
atom.notifications.addSuccess("tsconfig.json file created: <br/> " + res.createdFilePath);
93-
}
94-
});
95-
});
9614
var theContextView;
9715
atom.commands.add('atom-text-editor', 'typescript:context-actions', function (e) {
9816
if (!theContextView)
@@ -102,54 +20,6 @@ function registerCommands() {
10220
atom.commands.add('atom-text-editor', 'typescript:autocomplete', function (e) {
10321
autoCompleteProvider.triggerAutocompletePlus();
10422
});
105-
atom.commands.add('atom-text-editor', 'typescript:rename-refactor', function (e) {
106-
var editor = atom.workspace.getActiveTextEditor();
107-
if (true) {
108-
parent.getRenameInfo(atomUtils.getFilePathPosition()).then(function (res) {
109-
if (!res.canRename) {
110-
atom.notifications.addInfo('AtomTS: Rename not available at cursor location');
111-
return;
112-
}
113-
var paths = atomUtils.getOpenTypeScritEditorsConsistentPaths();
114-
var openPathsMap = utils.createMap(paths);
115-
var refactorPaths = Object.keys(res.locations);
116-
var openFiles = refactorPaths.filter(function (p) { return openPathsMap[p]; });
117-
var closedFiles = refactorPaths.filter(function (p) { return !openPathsMap[p]; });
118-
renameView.panelView.renameThis({
119-
autoSelect: true,
120-
title: 'Rename Variable',
121-
text: res.displayName,
122-
openFiles: openFiles,
123-
closedFiles: closedFiles,
124-
onCancel: function () { },
125-
onValidate: function (newText) {
126-
if (newText.replace(/\s/g, '') !== newText.trim()) {
127-
return 'The new variable must not contain a space';
128-
}
129-
if (!newText.trim()) {
130-
return 'If you want to abort : Press esc to exit';
131-
}
132-
return '';
133-
},
134-
onCommit: function (newText) {
135-
newText = newText.trim();
136-
atomUtils.getEditorsForAllPaths(Object.keys(res.locations))
137-
.then(function (editorMap) {
138-
Object.keys(res.locations).forEach(function (filePath) {
139-
var editor = editorMap[filePath];
140-
editor.transact(function () {
141-
res.locations[filePath].forEach(function (textSpan) {
142-
var range = atomUtils.getRangeForTextSpan(editor, textSpan);
143-
editor.setTextInBufferRange(range, newText);
144-
});
145-
});
146-
});
147-
});
148-
}
149-
});
150-
});
151-
}
152-
});
15323
atom.commands.add('atom-workspace', 'typescript:show-type', function (e) {
15424
var editor = atom.workspace.getActiveTextEditor();
15525
var editorView = atom.views.getView(editor);
@@ -190,105 +60,6 @@ function registerCommands() {
19060
atom.commands.add('atom-workspace', 'typescript:go-to-previous', function (e) {
19161
gotoHistory.gotoPrevious();
19262
});
193-
atom.commands.add('atom-workspace', 'typescript:find-references', function (e) {
194-
if (!atomUtils.commandForTypeScript(e))
195-
return;
196-
parent.getReferences(atomUtils.getFilePathPosition()).then(function (res) {
197-
mainPanelView_1.panelView.setReferences(res.references);
198-
simpleSelectionView_1.simpleSelectionView({
199-
items: res.references,
200-
viewForItem: function (item) {
201-
return "<div>\n <span>" + atom.project.relativize(item.filePath) + "</span>\n <div class=\"pull-right\">line: " + (item.position.line + 1) + "</div>\n <ts-view>" + escapeHtml(item.preview) + "</ts-view>\n <div>";
202-
},
203-
filterKey: utils.getName(function () { return res.references[0].filePath; }),
204-
confirmed: function (definition) {
205-
atom.workspace.open(definition.filePath, {
206-
initialLine: definition.position.line,
207-
initialColumn: definition.position.col
208-
});
209-
}
210-
});
211-
});
212-
});
213-
var theFileSymbolsView;
214-
var showFileSymbols = utils.debounce(function (filePath) {
215-
if (!theFileSymbolsView)
216-
theFileSymbolsView = new fileSymbolsView.FileSymbolsView();
217-
parent.getNavigationBarItems({ filePath: filePath }).then(function (res) {
218-
theFileSymbolsView.setNavBarItems(res.items, filePath);
219-
theFileSymbolsView.show();
220-
});
221-
}, 400);
222-
atom.commands.add('.platform-linux atom-text-editor, .platform-darwin atom-text-editor,.platform-win32 atom-text-editor', 'symbols-view:toggle-file-symbols', function (e) {
223-
var editor = atom.workspace.getActiveTextEditor();
224-
if (!editor)
225-
return false;
226-
if (path.extname(editor.getPath()) !== '.ts' && path.extname(editor.getPath()) !== '.tsx')
227-
return false;
228-
e.abortKeyBinding();
229-
var filePath = editor.getPath();
230-
showFileSymbols(filePath);
231-
});
232-
var theProjectSymbolsView;
233-
var showProjectSymbols = utils.debounce(function (filePath) {
234-
if (!theProjectSymbolsView)
235-
theProjectSymbolsView = new projectSymbolsView.ProjectSymbolsView();
236-
parent.getNavigateToItems({ filePath: filePath }).then(function (res) {
237-
theProjectSymbolsView.setNavBarItems(res.items);
238-
theProjectSymbolsView.show();
239-
});
240-
}, 400);
241-
atom.commands.add('atom-text-editor', 'symbols-view:toggle-project-symbols', function (e) {
242-
var editor = atom.workspace.getActiveTextEditor();
243-
if (!editor)
244-
return false;
245-
if (path.extname(editor.getPath()) !== '.ts')
246-
return false;
247-
e.abortKeyBinding();
248-
var filePath = editor.getPath();
249-
showProjectSymbols(filePath);
250-
});
251-
atomUtils.registerOpener({
252-
commandSelector: 'atom-text-editor',
253-
commandName: 'typescript:ast',
254-
uriProtocol: astView_1.astURI,
255-
getData: function () {
256-
return {
257-
text: atom.workspace.getActiveTextEditor().getText(),
258-
filePath: atomUtils.getCurrentPath()
259-
};
260-
},
261-
onOpen: function (data) {
262-
return new astView_1.AstView(data.filePath, data.text, false);
263-
}
264-
});
265-
atomUtils.registerOpener({
266-
commandSelector: 'atom-text-editor',
267-
commandName: 'typescript:ast-full',
268-
uriProtocol: astView_1.astURIFull,
269-
getData: function () {
270-
return {
271-
text: atom.workspace.getActiveTextEditor().getText(),
272-
filePath: atomUtils.getCurrentPath()
273-
};
274-
},
275-
onOpen: function (data) {
276-
return new astView_1.AstView(data.filePath, data.text, true);
277-
}
278-
});
279-
atomUtils.registerOpener({
280-
commandSelector: 'atom-workspace',
281-
commandName: 'typescript:dependency-view',
282-
uriProtocol: dependencyView_1.dependencyURI,
283-
getData: function () {
284-
return {
285-
filePath: atomUtils.getCurrentPath()
286-
};
287-
},
288-
onOpen: function (data) {
289-
return new dependencyView_1.DependencyView(data.filePath);
290-
}
291-
});
29263
atom.commands.add('atom-workspace', 'typescript:sync', function (e) {
29364
if (!atomUtils.commandForTypeScript(e))
29465
return;

dist/main/atom/commands/json2dtsCommands.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ function registerJson2dtsCommands() {
66
if (!atomUtils.commandForTypeScript(e))
77
return;
88
var editor = atom.workspace.getActiveTextEditor();
9-
var filePath = editor.getPath();
10-
var selection = editor.getSelectedBufferRange();
119
var text = editor.getSelectedText();
1210
var range = editor.getSelectedBufferRange();
1311
editor.setTextInBufferRange(range, json2dts_1.convert(text));

dist/main/atom/tooltipManager.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,3 @@ function pixelPositionFromMouseEvent(editorView, event) {
107107
var left = clientX - linesClientRect.left;
108108
return { top: top, left: left };
109109
}
110-
function screenPositionFromMouseEvent(editorView, event) {
111-
return editorView.getModel().screenPositionForPixelPosition(pixelPositionFromMouseEvent(editorView, event));
112-
}

dist/main/atom/views/dependencyView.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ function renderGraph(dependencies, mainContent, display) {
273273
var D3Graph = (function () {
274274
function D3Graph(links) {
275275
var _this = this;
276-
this.links = links;
277276
this.inDegLookup = {};
278277
this.outDegLookup = {};
279278
this.linkedByName = {};

dist/main/atom/views/mainPanelView.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use strict";
22
var tslib_1 = require("tslib");
33
var view = require("./view");
4-
var $ = view.$;
54
var lineMessageView = require("./lineMessageView");
65
var atomUtils = require("../atomUtils");
76
var utils = require("../../lang/utils");
@@ -290,7 +289,7 @@ var MainPanelView = (function (_super) {
290289
this.errorBody.append(view.$);
291290
};
292291
MainPanelView.prototype.setErrorSummary = function (summary) {
293-
var message = summary.summary, className = summary.className, raw = summary.rawSummary || false, handler = summary.handler || undefined;
292+
var message = summary.summary, className = summary.className, handler = summary.handler || undefined;
294293
this.summary.html(message);
295294
if (className) {
296295
this.summary.addClass(className);

dist/main/atom/views/plainMessageView.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use strict";
22
var tslib_1 = require("tslib");
33
var view = require("./view");
4-
var $ = view.$;
54
var PlainMessageView = (function (_super) {
65
tslib_1.__extends(PlainMessageView, _super);
76
function PlainMessageView() {

0 commit comments

Comments
 (0)