Skip to content

Commit 1089edc

Browse files
committed
Merge branch 'development' into 64bits
Conflicts: PluginCore/ScintillaNet/ScintillaControl.cs
2 parents 61b7a31 + 77a41e2 commit 1089edc

File tree

80 files changed

+1760
-810
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

+1760
-810
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ PluginCore/Bin
2323
/FlashDevelop/Bin/Debug/Settings/Recovery
2424
/FlashDevelop/Bin/Debug/Exceptions.log
2525
/FlashDevelop/Bin/Debug/Tools/fdbuild/fdbuild.exe
26+
FlashDevelop/Bin/Debug/Settings/Themes/CURRENT

CONTRIBUTING.md

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
# AppMan entries
2+
3+
If you want to add your plugin, theme or extension to AppMan, you need to do a pull request to the appman.xml file adding a new entry inside the FD5 comments. Requirements for the offered plugins, themes or extensions are:
4+
5+
* Code needs to be opensource and reviewable in a public repository
6+
* The item needs to be packaged into a FDZ file and provide a MD5 checksum for verification
7+
* The FDZ needs to extract the files to the user app data directory
8+
9+
# Coding style
10+
11+
##### Use spaces instead of tabs with a width of 4
12+
13+
```c#
14+
public bool IsMember()
15+
{
16+
if (this.value > 2)
17+
{
18+
return false;
19+
}
20+
else return true;
21+
}
22+
```
23+
24+
##### Naming should be in English and clear
25+
26+
```c#
27+
private int memberProperty = 0;
28+
```
29+
30+
##### Use camelCase for private members and uppercase for public properties, methods and types:
31+
32+
```c#
33+
private int memberProperty = 0;
34+
35+
public string MemberName = "MemberName";
36+
37+
public bool IsMember()
38+
{
39+
return true;
40+
}
41+
```
42+
43+
##### Use types without explicit path:
44+
45+
```c#
46+
private void OnFormActivate(object sender, /*System.*/EventArgs e)
47+
{
48+
// Do something...
49+
}
50+
```
51+
52+
##### Do not use extensive extra empty lines and keep the code clean, not like:
53+
54+
```c#
55+
// Comment...
56+
private int MemberMethod(int value)
57+
{
58+
59+
60+
61+
// Comment for something...
62+
63+
64+
if (value > 2))
65+
{
66+
67+
//this.oldCode = 0;
68+
69+
70+
// Random notes here
71+
72+
73+
74+
return -1;
75+
}
76+
77+
78+
79+
// Something here too...
80+
else return value;
81+
82+
83+
84+
85+
//Little bit here too...
86+
}
87+
```
88+
89+
##### Use brackets and parenthesis for easier readability:
90+
91+
```c#
92+
if ((val1 > val2) && (val1 > val3))
93+
{
94+
if (val2 > val3)
95+
{
96+
doThing();
97+
}
98+
}
99+
```
100+
101+
##### Do not nest expressions without brackets:
102+
103+
```c#
104+
if (val1 > val2 && val1 > val3)
105+
106+
if (val2 > val3)
107+
108+
doThing();
109+
110+
```
111+
112+
##### Use can use one liners to shorten the code:
113+
114+
```c#
115+
if (val1 > val2 && val1 > val3)
116+
{
117+
if (val2 > val3) doThing();
118+
}
119+
```
120+
121+
##### Use explicit types:
122+
123+
```c#
124+
int myValue = 0;
125+
Point[] myPoints = new Point[]
126+
{
127+
new Point(1, 1),
128+
new Point(2, 2)
129+
}
130+
```
131+
132+
##### Code example:
133+
134+
```c#
135+
import System;
136+
137+
namespace MyNameSpace
138+
{
139+
class MyClass
140+
{
141+
// Comment here...
142+
private int memberProperty = 0;
143+
private int memberProperty2 = 1;
144+
private int memberProperty3 = 2;
145+
146+
// Comment here...
147+
public string MemberName = "MemberName";
148+
149+
// Comment here...
150+
public static bool IsMemberProperty = false;
151+
152+
// Comment here...
153+
public const int CONSTANT = 1;
154+
155+
/// <summary>
156+
/// Comment here...
157+
/// </summary>
158+
public bool IsMember()
159+
{
160+
return true;
161+
}
162+
163+
/// <summary>
164+
/// Comment here...
165+
/// </summary>
166+
public void MemberMethod(int value)
167+
{
168+
int temp = CONSTANT;
169+
if (value > 2)
170+
{
171+
this.memberProperty2 = temp;
172+
this.memberProperty3 = temp;
173+
}
174+
else this.memberProperty3 = value;
175+
}
176+
177+
/// <summary>
178+
/// Comment here...
179+
/// </summary>
180+
private int MemberMethodEx(int value)
181+
{
182+
int temp = CONSTANT;
183+
this.memberProperty3 = temp;
184+
switch (value)
185+
{
186+
case 1: return 1;
187+
case 2:
188+
{
189+
return -1;
190+
}
191+
default: return value;
192+
}
193+
}
194+
195+
/// <summary>
196+
/// Comment here...
197+
/// </summary>
198+
private void OnFormActivate(object sender, EventArgs e)
199+
{
200+
this.MemberMethod(null, null);
201+
}
202+
203+
}
204+
205+
}
206+
```
207+
208+
##### More generally, be consistent and keep the code clean!

External/Plugins/AS2Context/Context.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ public Context(AS2Settings initSettings)
9999
features.objectKey = "Object";
100100
features.booleanKey = "Boolean";
101101
features.numberKey = "Number";
102+
features.stringKey = "String";
102103
features.arrayKey = "Array";
104+
features.dynamicKey = "*";
103105
features.importKey = "import";
104106
features.typesPreKeys = new string[] { "import", "new", "instanceof", "extends", "implements" };
105107
features.codeKeywords = new string[] {

External/Plugins/AS3Context/Compiler/FlexDebugger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void debugger_OnStarted(string line)
5454
{
5555
if (startMessage == null)
5656
return;
57-
PluginBase.RunAsync((MethodInvoker)delegate
57+
PluginBase.RunAsync(delegate
5858
{
5959
// send message again
6060
ignoreMessage = true;

External/Plugins/AS3Context/Compiler/FlexShells.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ private void ascRunner_Error(object sender, string line)
508508
private void ascRunner_OutputError(object sender, string line)
509509
{
510510
if (line == null) return;
511-
PluginBase.RunAsync((MethodInvoker)delegate
511+
PluginBase.RunAsync(delegate
512512
{
513513
if (line.StartsWith("Exception "))
514514
{
@@ -563,7 +563,7 @@ private void mxmlcRunner_Error(object sender, string line)
563563

564564
private void mxmlcRunner_Output(object sender, string line)
565565
{
566-
PluginBase.RunAsync((MethodInvoker)delegate
566+
PluginBase.RunAsync(delegate
567567
{
568568
if (!notificationSent && line.StartsWith("Done("))
569569
{

External/Plugins/AS3Context/Context.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ public Context(AS3Settings initSettings)
101101
features.objectKey = "Object";
102102
features.booleanKey = "Boolean";
103103
features.numberKey = "Number";
104+
features.stringKey = "String";
104105
features.arrayKey = "Array";
106+
features.dynamicKey = "*";
105107
features.importKey = "import";
106108
features.typesPreKeys = new string[] { "import", "new", "typeof", "is", "as", "extends", "implements" };
107109
features.codeKeywords = new string[] {

External/Plugins/AS3Context/PluginMain.cs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Object IPlugin.Settings
9999

100100
static public AS3Settings Settings
101101
{
102-
get { return settingObject as AS3Settings; }
102+
get { return settingObject; }
103103
}
104104
#endregion
105105

@@ -156,13 +156,13 @@ public void HandleEvent(Object sender, NotifyEvent e, HandlingPriority priority)
156156
if (PluginBase.CurrentProject != null && PluginBase.CurrentProject.Language == "as3")
157157
e.Handled = OpenVirtualFileModel(de.Data as String);
158158
}
159-
else if (!(settingObject as AS3Settings).DisableFDB && action == "AS3Context.StartDebugger")
159+
else if (!settingObject.DisableFDB && action == "AS3Context.StartDebugger")
160160
{
161161
string workDir = (PluginBase.CurrentProject != null)
162162
? Path.GetDirectoryName(PluginBase.CurrentProject.ProjectPath)
163163
: Environment.CurrentDirectory;
164164

165-
string flexSdk = (settingObject as AS3Settings).GetDefaultSDK().Path;
165+
string flexSdk = settingObject.GetDefaultSDK().Path;
166166

167167
// if the default sdk is not defined ask for project sdk
168168
if (String.IsNullOrEmpty(flexSdk))
@@ -265,25 +265,23 @@ public void HandleEvent(Object sender, NotifyEvent e, HandlingPriority priority)
265265
else if (inMXML)
266266
{
267267
DataEvent de = e as DataEvent;
268-
if (de.Action == "XMLCompletion.Element")
269-
{
270-
de.Handled = MxmlComplete.HandleElement(de.Data);
271-
}
272-
if (de.Action == "XMLCompletion.Namespace")
273-
{
274-
de.Handled = MxmlComplete.HandleNamespace(de.Data);
275-
}
276-
else if (de.Action == "XMLCompletion.CloseElement")
277-
{
278-
de.Handled = MxmlComplete.HandleElementClose(de.Data);
279-
}
280-
else if (de.Action == "XMLCompletion.Attribute")
268+
switch (de.Action)
281269
{
282-
de.Handled = MxmlComplete.HandleAttribute(de.Data);
283-
}
284-
else if (de.Action == "XMLCompletion.AttributeValue")
285-
{
286-
de.Handled = MxmlComplete.HandleAttributeValue(de.Data);
270+
case "XMLCompletion.Element":
271+
de.Handled = MxmlComplete.HandleElement(de.Data);
272+
break;
273+
case "XMLCompletion.Namespace":
274+
de.Handled = MxmlComplete.HandleNamespace(de.Data);
275+
break;
276+
case "XMLCompletion.CloseElement":
277+
de.Handled = MxmlComplete.HandleElementClose(de.Data);
278+
break;
279+
case "XMLCompletion.Attribute":
280+
de.Handled = MxmlComplete.HandleAttribute(de.Data);
281+
break;
282+
case "XMLCompletion.AttributeValue":
283+
de.Handled = MxmlComplete.HandleAttributeValue(de.Data);
284+
break;
287285
}
288286
}
289287
}

0 commit comments

Comments
 (0)