Skip to content

Commit 504fbc0

Browse files
author
ldoblies
committed
Add quickfix framework
1 parent ee78014 commit 504fbc0

File tree

5 files changed

+504
-1
lines changed

5 files changed

+504
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
define(function(require, exports, module) {
3+
"use strict";
4+
5+
/**
6+
* data structure for resolutions, containing
7+
* a label (short description, to be displayed in the list of resolutions),
8+
* an image (to be displayed in the list of resolutions),
9+
* a preview,
10+
* the applied content,
11+
* the position where the cursor should be after applying
12+
*/
13+
var MarkerResolution = function(label, image, preview, appliedContent, cursorTarget){
14+
return {
15+
label: label,
16+
image: image,
17+
preview: preview,
18+
appliedContent: appliedContent,
19+
cursorTarget: cursorTarget
20+
};
21+
};
22+
23+
24+
exports.MarkerResolution = MarkerResolution;
25+
26+
});

plugins-client/ext.language/language.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var UIWorkerClient = require("ace/worker/worker_client").UIWorkerClient;
1717
var useUIWorker = window.location && /[?&]noworker=1/.test(window.location.search);
1818

1919
var complete = require("ext/language/complete");
20+
var quickfix = require("ext/language/quickfix");
2021
var marker = require("ext/language/marker");
2122
var refactor = require("ext/language/refactor");
2223
var outline = require("ext/language/outline");
@@ -92,6 +93,7 @@ module.exports = ext.register("ext/language/language", {
9293
outline.hook(_self, worker);
9394
keyhandler.hook(_self, worker);
9495
jumptodef.hook(_self, worker);
96+
quickfix.hook(_self);
9597

9698
ide.dispatchEvent("language.worker", {worker: worker});
9799
ide.addEventListener("$event.language.worker", function(callback){

plugins-client/ext.language/language.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,27 @@
124124
</a:hbox>
125125
</a:bar>
126126

127+
<a:bar id="barQuickfixCont" skinset="language_skin" skin="codecomplete" width="600" visible="false">
128+
<a:hbox id="txtQuickfixHolder" class="code_complete_text_holder" anchors="0 0 0 0" edge="5" width="290">
129+
<a:text id="txtQuickfix" skin="codecomplete_text" flex="1" />
130+
<a:scrollbar
131+
for = "txtQuickfix"
132+
id = "sbQuickfix"
133+
margin = "2"
134+
skin = "sbios"
135+
width = "7"
136+
overflow2 = "auto"/>
137+
</a:hbox>
138+
<a:hbox class="code_complete_text_holder" anchors="0 0 0 330" edge="5" minheight="100">
139+
<a:text id="txtQuickfixDoc" skin="codecompletedoc_text" flex="1" />
140+
<a:scrollbar
141+
for = "txtQuickfixDoc"
142+
id = "sbQuickfixDoc"
143+
margin = "2"
144+
skin = "sbios"
145+
width = "7"
146+
overflow2 = "auto"/>
147+
</a:hbox>
148+
</a:bar>
149+
127150
</a:application>

plugins-client/ext.language/marker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ module.exports = {
8383
var gutterAnno = {
8484
guttertext: anno.message,
8585
type: anno.level || "warning",
86-
text: anno.message
86+
text: anno.message,
87+
pos: anno.pos,
88+
resolutions: anno.resolutions
8789
// row will be filled in updateFloat()
8890
};
8991

0 commit comments

Comments
 (0)