MyEclipse代码提示功能:
设置eclipse/myEclipse代码提示可以方便开发者,不用在记住拉杂的单词,只用打出首字母,就会出现提示菜单。如同dreamweaver一样方便。
设置超级自动提示:
8.5设置如下:
1.菜单window->Preferences->Java->Editor->Content Assist-右边-auto-activaction栏下-Enable auto activation 选项要打上勾
2.Auto Activation triggers for java 后面 直接写入(新版eclipse可以直接写入长字符)“.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,([{”
3.设置反映时间,Auto activation delay 默认为200,一般设置为20~50 4.*此时设置完还没有达到超级提示,软件对类和接口还有很好的提示。
4.继续设置window->Preferences->Java->Editor->Content Assist展开->Advanced 上面的选项卡Select the proposal kinds contained in the 'default' content assist list:中把7个选项全部勾上!此时设置结束,无论是语句,类,接口,关键字,还是方法,都能自动提示。
6.5的设置如下:
打开 MyEclipse 6.5 -> Window -> Perferences -> Java -> Editor -> Content(记住,不是他的下级选项,而是它本身),最下面一栏 auto-Activation ,会看到只有一个“.”存在。表示:只有输入“.”之后才会有代码提 示,我们要修改的地方就是这里,可是Eclipse默认只允许输入4个自定义字符。
不过我们可以把当前的设置导出,保 存为一个文件,然后在文件中修改,再导入设置,这样就可以突破Eclipse的限制。
先把上图中“.“的地方输入几个 随便的字符,例如“asdf“,点最下面的“OK“来保存设置。
然 后打开 Eclipse的 File -> Export,在窗口中展开 General -> Perferences-->Export all然后点击 NEXT。然后点击“Browse”选择任意的一个路径,保存配置文件,然后点击“Finish“用记事本打开刚才 保存的那个配置文件(扩展文件名:*.epf),按“ctrl + F”,输入刚才设置的“asdf”,找到刚才字符串。把“asdf”修改为“abcdefghijklmnopqrstuvwxyz.”,然后保存,退出记事本。
打 开Eclipse的 File -> Import 然后在打开的窗口里展开 General ->
Perferences,点击NEXT, 选中刚才修改过的配置文件,Finish。现在,再打开Window ->
Perferences,并依次展开 Java -> Editor -> Content
Assist,会发现已经超过了4个字符,也就是说我们输入任何字母和“.”都 会有代码提示了。
8.6的设置如下:
1、菜单window->Preferences->Java->Editor->Content Assist->Enable auto activation 选项要打上勾
2、windows–>preference–>general–>keys 下设置Content Assist 的快捷键
3、window->Preferences->Java->Editor->Content Assist->Advanced 上面的选项卡Select the proposal kinds contained in the ‘default’ content assist list: 中把 Other Java Proposals 选项打上勾就可以了
MyEclipse激活码生成器(6.6有用,其余的版本没试过)
public class MyEclipseGen {
private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself.";//定义一个String字符串
public String getSerial(String userId, String licenseNum) {
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.add(1, 3);
cal.add(6, -1);
java.text.NumberFormat nf = new java.text.DecimalFormat("000");
licenseNum = nf.format(Integer.valueOf(licenseNum));
String verTime = new StringBuilder("-").append(new java.text.
SimpleDateFormat("yyMMdd").format(cal.getTime())).append("0").
toString();
String type = "YE3MP-";
String need = new StringBuilder(userId.substring(0, 1)).append(type).
append("300").append(licenseNum).append(verTime).toString();
String dx = new StringBuilder(need).append(LL).append(userId).toString();
int suf = this.decode(dx);
String code = new StringBuilder(need).append(String.valueOf(suf)).
toString();
return this.change(code);
}
private int decode(String s) {
int i;
char[] ac;
int j;
int k;
i = 0;
ac = s.toCharArray();
j = 0;
k = ac.length;
while (j < k) {
i = (31 * i) + ac[j];
j++;
}
return Math.abs(i);
}
private String change(String s) {
byte[] abyte0;
char[] ac;
int i;
int k;
int j;
abyte0 = s.getBytes();
ac = new char[s.length()];
i = 0;
k = abyte0.length;
while (i < k) {
j = abyte0[i];
if ((j >= 48) && (j <= 57)) {
j = (((j - 48) + 5) % 10) + 48;
} else if ((j >= 65) && (j <= 90)) {
j = (((j - 65) + 13) % 26) + 65;
} else if ((j >= 97) && (j <= 122)) {
j = (((j - 97) + 13) % 26) + 97;
}
ac[i] = (char) j;
i++;
}
return String.valueOf(ac);
}
public MyEclipseGen() {
super();
}
public static void main(String[] args) {
try {
System.out.println("please input register name:");
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
String userId = null;
userId = reader.readLine();
MyEclipseGen myeclipsegen = new MyEclipseGen();
String res = myeclipsegen.getSerial(userId, "20");
System.out.println("Serial:" + res); //输出序列号信息
reader.readLine();
} catch (IOException ex) {
}
}
}