mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git@git.labs.intellij.net:idea/community
This commit is contained in:
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
<grid id="e5f4d" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="8" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="133" y="39" width="564" height="584"/>
|
||||
<xy x="133" y="39" width="708" height="584"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -43,7 +43,7 @@
|
||||
<componentClass value="com.intellij.openapi.ui.TextFieldWithBrowseButton"/>
|
||||
<labelInsets top="0" left="0" bottom="0" right="0"/>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="212" height="16"/>
|
||||
<labelPreferredSize width="215" height="16"/>
|
||||
<text resource-bundle="messages/ExecutionBundle" key="applet.configuration.policy.file.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -57,7 +57,7 @@
|
||||
<componentClass value="com.intellij.ui.RawCommandLineEditor"/>
|
||||
<labelInsets top="0" left="0" bottom="0" right="0"/>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="212" height="16"/>
|
||||
<labelPreferredSize width="215" height="16"/>
|
||||
<text resource-bundle="messages/ExecutionBundle" key="applet.configuration.vm.parameters.for.appletviewer.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -69,6 +69,7 @@
|
||||
<componentClass value="javax.swing.JComboBox"/>
|
||||
<labelInsets top="0" left="0" bottom="0" right="0"/>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="215" height="16"/>
|
||||
<text resource-bundle="messages/ExecutionBundle" key="applet.configuration.use.classpath.and.jdk.of.module.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -260,18 +261,20 @@
|
||||
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<component id="b2d36" class="com.intellij.execution.ui.AlternativeJREPanel" binding="myAlternativeJREPanel">
|
||||
<constraints>
|
||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="9e31a" class="javax.swing.JSeparator">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="b2d36" class="com.intellij.execution.ui.AlternativeJREPanel" binding="myAlternativeJREPanel">
|
||||
<constraints>
|
||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<checkBoxPreferredSize width="215" height="23"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
|
||||
+10
-7
@@ -3,7 +3,7 @@
|
||||
<grid id="93687" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="6" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="53" y="36" width="596" height="433"/>
|
||||
<xy x="53" y="36" width="708" height="433"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -17,17 +17,17 @@
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<properties>
|
||||
<labelsPreferredSize width="215" height="16"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="50d08" class="com.intellij.openapi.ui.LabeledComponent" binding="myMainClass" custom-create="true">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="154" height="25"/>
|
||||
</grid>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="144" height="16"/>
|
||||
<labelPreferredSize width="215" height="16"/>
|
||||
<text resource-bundle="messages/ExecutionBundle" key="application.configuration.main.class.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -38,6 +38,7 @@
|
||||
<properties>
|
||||
<componentClass value="javax.swing.JComboBox"/>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="215" height="16"/>
|
||||
<text resource-bundle="messages/ExecutionBundle" key="application.configuration.use.classpath.and.jdk.of.module.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -45,7 +46,9 @@
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<properties>
|
||||
<checkBoxPreferredSize width="215" height="23"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="b45cf" class="javax.swing.JCheckBox" binding="myShowSwingInspectorCheckbox">
|
||||
<constraints>
|
||||
|
||||
@@ -45,9 +45,8 @@ public class AlternativeJREPanel extends JPanel {
|
||||
super(new GridBagLayout());
|
||||
|
||||
myCbEnabled = new JCheckBox(ExecutionBundle.message("run.configuration.use.alternate.jre.checkbox"));
|
||||
myCbEnabled.setPreferredSize(new Dimension(154, 16));
|
||||
final GridBagConstraints gc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST,
|
||||
GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
|
||||
GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
|
||||
add(myCbEnabled, gc);
|
||||
|
||||
myFieldWithHistory = new TextFieldWithHistory();
|
||||
@@ -64,11 +63,13 @@ public class AlternativeJREPanel extends JPanel {
|
||||
TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT);
|
||||
gc.gridx = 1;
|
||||
gc.weightx = 1;
|
||||
gc.fill = GridBagConstraints.HORIZONTAL;
|
||||
gc.insets.left = 10;
|
||||
add(myPathField, gc);
|
||||
InsertPathAction.addTo(myFieldWithHistory.getTextEditor());
|
||||
|
||||
gc.weighty = 1;
|
||||
add(Box.createVerticalBox(), gc);
|
||||
//gc.weighty = 1;
|
||||
//add(Box.createVerticalBox(), gc);
|
||||
|
||||
myCbEnabled.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@@ -105,4 +106,12 @@ public class AlternativeJREPanel extends JPanel {
|
||||
setPathEnabled(isEnabled);
|
||||
setPath(path);
|
||||
}
|
||||
|
||||
public void setCheckBoxPreferredSize(Dimension d) {
|
||||
myCbEnabled.setPreferredSize(d);
|
||||
}
|
||||
|
||||
public Dimension getCheckBoxPreferredSize() {
|
||||
return myCbEnabled.getPreferredSize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.intellij.execution.CommonJavaRunConfigurationParameters;
|
||||
import com.intellij.execution.ExecutionBundle;
|
||||
import com.intellij.openapi.ui.LabeledComponent;
|
||||
import com.intellij.ui.RawCommandLineEditor;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@@ -36,12 +37,17 @@ public class CommonJavaParametersPanel extends CommonProgramParametersPanel {
|
||||
copyDialogCaption(myVMParameters);
|
||||
|
||||
myVMParameters.setLabelLocation(BorderLayout.WEST);
|
||||
myVMParameters.setLabelPreferredSize(super.getProgramParametersComponent().getLabelPreferredSize());
|
||||
|
||||
add(myVMParameters);
|
||||
super.addComponents();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLabelsPreferredSize(Dimension d) {
|
||||
super.setLabelsPreferredSize(d);
|
||||
myVMParameters.setLabelPreferredSize(d);
|
||||
}
|
||||
|
||||
public void setVMParameters(String text) {
|
||||
myVMParameters.getComponent().setText(text);
|
||||
}
|
||||
|
||||
+3
-1
@@ -3,7 +3,7 @@
|
||||
<grid id="27dc6" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="9" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="35" y="92" width="544" height="389"/>
|
||||
<xy x="35" y="92" width="544" height="396"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -170,6 +170,7 @@
|
||||
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<smallFont value="true"/>
|
||||
<text value="Signature preview"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -186,6 +187,7 @@
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<smallFont value="true"/>
|
||||
<text value="Parameters"/>
|
||||
</properties>
|
||||
</component>
|
||||
|
||||
+113
-104
@@ -3,20 +3,27 @@
|
||||
#include "jni_util.h"
|
||||
#include "windows.h"
|
||||
|
||||
jfieldID nameId;
|
||||
jfieldID nameID;
|
||||
jfieldID attributesID;
|
||||
jfieldID timestampID;
|
||||
jfieldID lengthID;
|
||||
|
||||
HANDLE FindFileInner(JNIEnv *env, jstring path, LPWIN32_FIND_DATA lpData) {
|
||||
const jchar* str = env->GetStringChars(path, 0);
|
||||
HANDLE h = FindFirstFile((LPCWSTR)str, lpData);
|
||||
env->ReleaseStringChars(path, str);
|
||||
return h;
|
||||
JNIEXPORT void JNICALL Java_com_intellij_openapi_vfs_impl_win32_FileInfo_initIDs(JNIEnv *env, jclass cls) {
|
||||
nameID = env->GetFieldID(cls, "name", "Ljava/lang/String;");
|
||||
attributesID = env->GetFieldID(cls, "attributes", "I");
|
||||
timestampID = env->GetFieldID(cls, "timestamp", "J");
|
||||
lengthID = env->GetFieldID(cls, "length", "J");
|
||||
}
|
||||
|
||||
bool CopyObjectArray(JNIEnv *env, jobjectArray dst, jobjectArray src,
|
||||
jint count)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<count; i++) {
|
||||
static HANDLE FindFileInner(JNIEnv *env, jstring path, LPWIN32_FIND_DATA lpData) {
|
||||
const jchar* str = env->GetStringChars(path, 0);
|
||||
const HANDLE h = FindFirstFile((LPCWSTR)str, lpData);
|
||||
env->ReleaseStringChars(path, str);
|
||||
return h;
|
||||
}
|
||||
|
||||
static bool CopyObjectArray(JNIEnv *env, jobjectArray dst, jobjectArray src, jint count) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
jobject p = env->GetObjectArrayElement(src, i);
|
||||
env->SetObjectArrayElement(dst, i, p);
|
||||
env->DeleteLocalRef(p);
|
||||
@@ -24,121 +31,123 @@ bool CopyObjectArray(JNIEnv *env, jobjectArray dst, jobjectArray src,
|
||||
return true;
|
||||
}
|
||||
|
||||
static LONGLONG
|
||||
fileTimeToInt64 (const FILETIME * time)
|
||||
{
|
||||
ULARGE_INTEGER _time;
|
||||
|
||||
_time.LowPart = time->dwLowDateTime;
|
||||
_time.HighPart = time->dwHighDateTime;
|
||||
|
||||
return _time.QuadPart;
|
||||
static LONGLONG pairToInt64(DWORD lowPart, DWORD highPart) {
|
||||
ULARGE_INTEGER large;
|
||||
large.LowPart = lowPart;
|
||||
large.HighPart = highPart;
|
||||
return large.QuadPart;
|
||||
}
|
||||
|
||||
jfieldID nameID;
|
||||
jfieldID attributesID;
|
||||
jfieldID timestampID;
|
||||
jfieldID lengthID;
|
||||
#define IS_SET(flags, flag) ((flags & flag) == flag)
|
||||
|
||||
jobject CreateFileInfo(JNIEnv *env, LPWIN32_FIND_DATA lpData, jclass cls) {
|
||||
static jobject CreateFileInfo(JNIEnv *env, jstring path, bool append, LPWIN32_FIND_DATA lpData, jclass cls) {
|
||||
jobject o = env->AllocObject(cls);
|
||||
if (o == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
jobject o = env->AllocObject(cls);
|
||||
if (o == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
jstring fileName = env->NewString((jchar*)lpData->cFileName, (jsize)wcslen(lpData->cFileName));
|
||||
if (fileName == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
env->SetObjectField(o, nameID, fileName);
|
||||
env->SetIntField(o, attributesID, lpData->dwFileAttributes);
|
||||
env->SetLongField(o, timestampID, fileTimeToInt64(&lpData->ftLastWriteTime));
|
||||
jstring fileName = env->NewString((jchar*)lpData->cFileName, (jsize)wcslen(lpData->cFileName));
|
||||
if (fileName == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
env->SetObjectField(o, nameID, fileName);
|
||||
|
||||
ULARGE_INTEGER size;
|
||||
size.LowPart = lpData->nFileSizeLow;
|
||||
size.HighPart = lpData->nFileSizeHigh;
|
||||
env->SetLongField(o, lengthID, size.QuadPart);
|
||||
return o;
|
||||
}
|
||||
bool read = false;
|
||||
if (IS_SET(lpData->dwFileAttributes, FILE_ATTRIBUTE_REPARSE_POINT) && IS_SET(lpData->dwReserved0, IO_REPARSE_TAG_SYMLINK)) {
|
||||
int nameLen = env->GetStringLength(path) + wcslen(lpData->cFileName) + 2;
|
||||
wchar_t *lpName = (wchar_t *)malloc(nameLen * sizeof(wchar_t));
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_intellij_openapi_vfs_impl_win32_FileInfo_initIDs(JNIEnv *env, jclass cls) {
|
||||
nameID = env->GetFieldID(cls, "name", "Ljava/lang/String;");
|
||||
attributesID = env->GetFieldID(cls, "attributes", "I");
|
||||
timestampID = env->GetFieldID(cls, "timestamp", "J");
|
||||
lengthID = env->GetFieldID(cls, "length", "J");
|
||||
if (lpName != NULL) {
|
||||
const jchar *dirName = env->GetStringChars(path, 0);
|
||||
wcscpy_s(lpName, nameLen, (LPCWSTR)dirName);
|
||||
env->ReleaseStringChars(path, dirName);
|
||||
if (append) {
|
||||
wcscat_s(lpName, nameLen, L"\\");
|
||||
wcscat_s(lpName, nameLen, lpData->cFileName);
|
||||
}
|
||||
|
||||
// read symlink target attributes
|
||||
HANDLE th = CreateFile(lpName, FILE_READ_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL,
|
||||
OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
||||
if (th != INVALID_HANDLE_VALUE) {
|
||||
BY_HANDLE_FILE_INFORMATION targetData;
|
||||
if (GetFileInformationByHandle(th, &targetData)) {
|
||||
env->SetIntField(o, attributesID, targetData.dwFileAttributes);
|
||||
env->SetLongField(o, timestampID, pairToInt64(targetData.ftLastWriteTime.dwLowDateTime, targetData.ftLastWriteTime.dwHighDateTime));
|
||||
env->SetLongField(o, lengthID, pairToInt64(targetData.nFileSizeLow, targetData.nFileSizeHigh));
|
||||
read = true;
|
||||
}
|
||||
CloseHandle(th);
|
||||
}
|
||||
|
||||
free(lpName);
|
||||
}
|
||||
}
|
||||
|
||||
if (!read) {
|
||||
env->SetIntField(o, attributesID, lpData->dwFileAttributes);
|
||||
env->SetLongField(o, timestampID, pairToInt64(lpData->ftLastWriteTime.dwLowDateTime, lpData->ftLastWriteTime.dwHighDateTime));
|
||||
env->SetLongField(o, lengthID, pairToInt64(lpData->nFileSizeLow, lpData->nFileSizeHigh));
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_getInfo(JNIEnv *env, jobject method, jstring path) {
|
||||
WIN32_FIND_DATA data;
|
||||
HANDLE h = FindFileInner(env, path, &data);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
return NULL;
|
||||
}
|
||||
FindClose(h);
|
||||
jclass infoClass = env->FindClass("com/intellij/openapi/vfs/impl/win32/FileInfo");
|
||||
return CreateFileInfo(env, &data, infoClass);
|
||||
WIN32_FIND_DATA data;
|
||||
HANDLE h = FindFileInner(env, path, &data);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
return NULL;
|
||||
}
|
||||
FindClose(h);
|
||||
jclass infoClass = env->FindClass("com/intellij/openapi/vfs/impl/win32/FileInfo");
|
||||
return CreateFileInfo(env, path, false, &data, infoClass);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_checkExist(JNIEnv *env, jobject method, jstring path) {
|
||||
jint result = 0;
|
||||
WIN32_FILE_ATTRIBUTE_DATA wfad;
|
||||
const jchar* str = env->GetStringChars(path, 0);
|
||||
JNIEXPORT jobjectArray JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_listChildren(JNIEnv *env, jobject method, jstring path) {
|
||||
WIN32_FIND_DATA data;
|
||||
HANDLE h = FindFileInner(env, path, &data);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (GetFileAttributesEx((LPCWSTR)path, GetFileExInfoStandard, &wfad)) return JNI_TRUE;
|
||||
return JNI_FALSE;
|
||||
}
|
||||
jobjectArray rv, old;
|
||||
int len = 0, maxlen = 16;
|
||||
jclass infoClass = env->FindClass("com/intellij/openapi/vfs/impl/win32/FileInfo");
|
||||
rv = env->NewObjectArray(maxlen, infoClass, NULL);
|
||||
if (rv == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
JNIEXPORT jobjectArray JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_listChildren(JNIEnv *env, jobject method, jstring path)
|
||||
{
|
||||
|
||||
WIN32_FIND_DATA data;
|
||||
HANDLE h = FindFileInner(env, path, &data);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
jobjectArray rv, old;
|
||||
int len, maxlen;
|
||||
|
||||
len = 0;
|
||||
maxlen = 16;
|
||||
jclass infoClass = env->FindClass("com/intellij/openapi/vfs/impl/win32/FileInfo");
|
||||
rv = env->NewObjectArray(maxlen, infoClass, NULL);
|
||||
if (rv == NULL) goto error;
|
||||
do {
|
||||
do {
|
||||
if (len == maxlen) {
|
||||
old = rv;
|
||||
rv = env->NewObjectArray(maxlen <<= 1,
|
||||
infoClass, NULL);
|
||||
if (rv == NULL) goto error;
|
||||
if (!CopyObjectArray(env, rv, old, len)) goto error;
|
||||
rv = env->NewObjectArray(maxlen <<= 1, infoClass, NULL);
|
||||
if (rv == NULL || !CopyObjectArray(env, rv, old, len)) {
|
||||
goto error;
|
||||
}
|
||||
env->DeleteLocalRef(old);
|
||||
}
|
||||
jobject o = CreateFileInfo(env, &data, infoClass);
|
||||
env->SetObjectArrayElement(rv, len++, o);
|
||||
env->DeleteLocalRef(o);
|
||||
}
|
||||
while (FindNextFile(h, &data));
|
||||
jobject o = CreateFileInfo(env, path, true, &data, infoClass);
|
||||
env->SetObjectArrayElement(rv, len++, o);
|
||||
env->DeleteLocalRef(o);
|
||||
}
|
||||
while (FindNextFile(h, &data));
|
||||
|
||||
FindClose(h);
|
||||
|
||||
old = rv;
|
||||
rv = env->NewObjectArray(len, infoClass, NULL);
|
||||
if (rv == NULL) goto error;
|
||||
if (!CopyObjectArray(env, rv, old, len)) goto error;
|
||||
return rv;
|
||||
FindClose(h);
|
||||
|
||||
old = rv;
|
||||
rv = env->NewObjectArray(len, infoClass, NULL);
|
||||
if (rv == NULL || !CopyObjectArray(env, rv, old, len)) {
|
||||
goto error;
|
||||
}
|
||||
return rv;
|
||||
|
||||
error:
|
||||
FindClose(h);
|
||||
return NULL;
|
||||
FindClose(h);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,3 +26,5 @@
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files:
|
||||
#include <windows.h>
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="7f988" layout-manager="GridLayoutManager" row-count="11" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="7f988" layout-manager="GridLayoutManager" row-count="10" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
@@ -135,38 +135,44 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="749a1" class="javax.swing.JCheckBox" binding="myCbAutopopupJavaDoc">
|
||||
<constraints>
|
||||
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<margin top="2" left="2" bottom="0" right="2"/>
|
||||
<text resource-bundle="messages/ApplicationBundle" key="editbox.autopopup.javadoc.in.ms"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="b0975" class="com.intellij.ui.components.JBLabel">
|
||||
<constraints>
|
||||
<grid row="10" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="5" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="4"/>
|
||||
<style value="SMALL"/>
|
||||
<text value="For explicitly invoked completion"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="a1f3b" class="javax.swing.JTextField" binding="myAutopopupJavaDocField">
|
||||
<constraints>
|
||||
<grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="9" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="50" height="-1"/>
|
||||
<preferred-size width="144" height="28"/>
|
||||
<maximum-size width="50" height="-1"/>
|
||||
</grid>
|
||||
<grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<columns value="4"/>
|
||||
<text value="1000"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="f8961" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="749a1" class="javax.swing.JCheckBox" binding="myCbAutopopupJavaDoc">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<margin top="2" left="2" bottom="0" right="2"/>
|
||||
<text resource-bundle="messages/ApplicationBundle" key="editbox.autopopup.javadoc.in.ms"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="b0975" class="com.intellij.ui.components.JBLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="5" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="4"/>
|
||||
<style value="SMALL"/>
|
||||
<text value="For explicitly invoked completion"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="8dae3" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$BoldWithIndent"/>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$SimpleWithIndent"/>
|
||||
</clientProperties>
|
||||
<border type="etched" title-resource-bundle="messages/ExecutionBundle" title-key="before.launch.panel.title"/>
|
||||
<children/>
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.ui.FixedSizeButton;
|
||||
import com.intellij.openapi.ui.LabeledComponent;
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
||||
import com.intellij.openapi.ui.VerticalFlowLayout;
|
||||
import com.intellij.openapi.ui.popup.JBPopup;
|
||||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
@@ -34,6 +35,8 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.RawCommandLineEditor;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -53,9 +56,12 @@ public class CommonProgramParametersPanel extends JPanel {
|
||||
private Module myModuleContext = null;
|
||||
private boolean myHaveModuleContext = false;
|
||||
|
||||
protected static final Dimension notSpecifiedSize = new Dimension(-1, -1);
|
||||
protected Dimension labelsPreferredSize = notSpecifiedSize;
|
||||
|
||||
public CommonProgramParametersPanel() {
|
||||
super();
|
||||
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
|
||||
setLayout(new VerticalFlowLayout(VerticalFlowLayout.MIDDLE, 0, 5, true, false));
|
||||
|
||||
initComponents();
|
||||
copyDialogCaption(myProgramParametersComponent);
|
||||
@@ -106,8 +112,6 @@ public class CommonProgramParametersPanel extends JPanel {
|
||||
myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
|
||||
myProgramParametersComponent.setLabelLocation(BorderLayout.WEST);
|
||||
myWorkingDirectoryComponent.setLabelLocation(BorderLayout.WEST);
|
||||
myProgramParametersComponent.setLabelPreferredSize(new Dimension(myEnvVariablesComponent.getLabelPreferredSize().width - 4, myEnvVariablesComponent.getLabelPreferredSize().height));
|
||||
myWorkingDirectoryComponent.setLabelPreferredSize(myProgramParametersComponent.getLabelPreferredSize());
|
||||
|
||||
addComponents();
|
||||
|
||||
@@ -167,4 +171,19 @@ public class CommonProgramParametersPanel extends JPanel {
|
||||
myEnvVariablesComponent.setEnvs(configuration.getEnvs());
|
||||
myEnvVariablesComponent.setPassParentEnvs(configuration.isPassParentEnvs());
|
||||
}
|
||||
|
||||
public void setLabelsPreferredSize(Dimension d) {
|
||||
if (notSpecifiedSize.equals(d)) {
|
||||
d = null;
|
||||
}
|
||||
labelsPreferredSize = d;
|
||||
myEnvVariablesComponent.setLabelPreferredSize(d);
|
||||
myProgramParametersComponent.setLabelPreferredSize(d);
|
||||
myWorkingDirectoryComponent.setLabelPreferredSize(d);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Dimension getLabelsPreferredSize() {
|
||||
return labelsPreferredSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ public class LabeledComponent<Comp extends JComponent> extends JPanel {
|
||||
private Comp myComponent;
|
||||
private String myLabelConstraints = BorderLayout.NORTH;
|
||||
|
||||
private static final Dimension notSpecifiedSize = new Dimension(-1, -1);
|
||||
private Dimension labelPreferredSize = notSpecifiedSize;
|
||||
|
||||
public LabeledComponent() {
|
||||
super(new BorderLayout(AbstractLayout.DEFAULT_HGAP, AbstractLayout.DEFAULT_VGAP));
|
||||
insertLabel();
|
||||
@@ -50,11 +53,15 @@ public class LabeledComponent<Comp extends JComponent> extends JPanel {
|
||||
}
|
||||
|
||||
public void setLabelPreferredSize(Dimension d) {
|
||||
if (notSpecifiedSize.equals(d)) {
|
||||
d = null;
|
||||
}
|
||||
labelPreferredSize = d;
|
||||
myLabel.setPreferredSize(d);
|
||||
}
|
||||
|
||||
public Dimension getLabelPreferredSize() {
|
||||
return myLabel.getPreferredSize();
|
||||
return labelPreferredSize;
|
||||
}
|
||||
|
||||
public void setText(String textWithMnemonic) {
|
||||
|
||||
@@ -36,24 +36,25 @@ public class TitledSeparator extends JPanel {
|
||||
public TitledSeparator(String text) {
|
||||
this(text, false, true);
|
||||
}
|
||||
|
||||
|
||||
public TitledSeparator(String text, boolean boldFont, boolean smallFont) {
|
||||
setLayout(new GridBagLayout());
|
||||
|
||||
this.myLabel = new JLabel();
|
||||
add(myLabel, new GridBagConstraints(0, 0, 1, 1, 0, 1, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 8), 0, 0));
|
||||
Color oldColor = UIManager.getColor("Separator.foreground");
|
||||
UIManager.put("Separator.foreground", UIUtil.getBorderColor());
|
||||
|
||||
JSeparator separator = new JSeparator(SwingConstants.HORIZONTAL);
|
||||
UIManager.put("Separator.foreground", oldColor);
|
||||
separator.setForeground(UIUtil.getBorderColor());
|
||||
add(separator,
|
||||
new GridBagConstraints(1, 0, GridBagConstraints.REMAINDER, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(3, 0, 0, 0), 0, 0));
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(3, 0, 5, 5));
|
||||
|
||||
setTitleFont(UIUtil.getBorderFont(smallFont ? UIUtil.FontSize.SMALL : UIUtil.FontSize.NORMAL, boldFont));
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 5, 5));
|
||||
|
||||
myLabel.setFont(UIUtil.getBorderFont(smallFont ? UIUtil.FontSize.SMALL : UIUtil.FontSize.NORMAL, boldFont));
|
||||
myLabel.setText(text);
|
||||
this.boldFont = boldFont;
|
||||
this.smallFont = smallFont;
|
||||
setText(text);
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
|
||||
+11
-15
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.application.options.pathMacros.PathMacroListEditor">
|
||||
<grid id="f12c5" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="f12c5" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="33" y="34" width="588" height="355"/>
|
||||
@@ -10,14 +10,16 @@
|
||||
<children>
|
||||
<component id="10b63" class="com.intellij.ui.components.JBScrollPane" binding="myScrollPane">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="-1" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<grid id="6e973" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -55,17 +57,10 @@
|
||||
</vspacer>
|
||||
</children>
|
||||
</grid>
|
||||
<vspacer id="f7f12">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="-1" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<grid id="972af" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="972af" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -86,12 +81,13 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="295b9" class="javax.swing.JLabel">
|
||||
<component id="557df" class="com.intellij.ui.components.JBLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="5" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Use ; to separate ignored variables."/>
|
||||
<style value="SMALL"/>
|
||||
<text value="use ; to separate ignored variables"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,8 +19,7 @@ package com.intellij.openapi.vfs.impl.win32;
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class IdeaWin32 {
|
||||
public native FileInfo getInfo(String path);
|
||||
|
||||
public native FileInfo getInfo(String path);
|
||||
|
||||
public native FileInfo[] listChildren(String path);
|
||||
public native FileInfo[] listChildren(String path);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,9 +26,8 @@ import java.util.Map;
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class Win32Kernel {
|
||||
|
||||
public static final int FILE_ATTRIBUTE_READONLY = 0x0001;
|
||||
public static final int FILE_ATTRIBUTE_DIRECTORY = 0x0010;
|
||||
public static final int FILE_ATTRIBUTE_READONLY = 0x0001;
|
||||
|
||||
private final IdeaWin32 myKernel = new IdeaWin32();
|
||||
|
||||
@@ -39,7 +38,6 @@ public class Win32Kernel {
|
||||
}
|
||||
|
||||
public String[] list(String absolutePath) {
|
||||
|
||||
FileInfo[] fileInfos = myKernel.listChildren(absolutePath.replace('/', '\\') + "\\*.*");
|
||||
if (fileInfos == null) {
|
||||
return ArrayUtil.EMPTY_STRING_ARRAY;
|
||||
@@ -62,7 +60,7 @@ public class Win32Kernel {
|
||||
}
|
||||
|
||||
public void exists(String path) throws FileNotFoundException {
|
||||
getInfo(path);
|
||||
getInfo(path);
|
||||
}
|
||||
|
||||
public boolean isDirectory(String path) throws FileNotFoundException {
|
||||
@@ -88,7 +86,6 @@ public class Win32Kernel {
|
||||
private FileInfo getInfo(String path) throws FileNotFoundException {
|
||||
FileInfo info = myCache.get(path);
|
||||
if (info == null) {
|
||||
|
||||
info = myKernel.getInfo(path.replace('/', '\\'));
|
||||
if (info == null) {
|
||||
throw new FileNotFoundException(path);
|
||||
|
||||
+26
-12
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,7 +15,9 @@
|
||||
*/
|
||||
package com.intellij.openapi.vfs.impl.win32;
|
||||
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.impl.local.LocalFileSystemBase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -29,18 +31,31 @@ import java.util.Set;
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class Win32LocalFileSystem extends LocalFileSystemBase {
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vfs.impl.win32.Win32LocalFileSystem");
|
||||
|
||||
private static boolean ourIsAvailable;
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("IdeaWin32");
|
||||
ourIsAvailable = true;
|
||||
}
|
||||
catch (Throwable e) {
|
||||
ourIsAvailable = false;
|
||||
if (SystemInfo.isWindows) {
|
||||
try {
|
||||
System.load(PathManager.getHomePath() + "/community/bin/win/IdeaWin32.dll");
|
||||
ourIsAvailable = true;
|
||||
}
|
||||
catch (Throwable t0) {
|
||||
try {
|
||||
System.load(PathManager.getHomePath() + "/bin/win/IdeaWin32.dll");
|
||||
ourIsAvailable = true;
|
||||
}
|
||||
catch (Throwable t1) {
|
||||
try {
|
||||
System.loadLibrary("IdeaWin32");
|
||||
ourIsAvailable = true;
|
||||
}
|
||||
catch (Throwable t2) {
|
||||
ourIsAvailable = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +71,7 @@ public class Win32LocalFileSystem extends LocalFileSystemBase {
|
||||
};
|
||||
|
||||
public static Win32LocalFileSystem getWin32Instance() {
|
||||
if (!isAvailable()) throw new RuntimeException("dll is not loaded");
|
||||
if (!isAvailable()) throw new RuntimeException("DLL is not loaded");
|
||||
Win32LocalFileSystem fileSystem = THREAD_LOCAL.get();
|
||||
fileSystem.myKernel.clearCache();
|
||||
return fileSystem;
|
||||
@@ -65,8 +80,7 @@ public class Win32LocalFileSystem extends LocalFileSystemBase {
|
||||
private final Win32Kernel myKernel = new Win32Kernel();
|
||||
public static boolean checkMe = false;
|
||||
|
||||
private Win32LocalFileSystem() {
|
||||
}
|
||||
private Win32LocalFileSystem() { }
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@@ -157,7 +171,7 @@ public class Win32LocalFileSystem extends LocalFileSystemBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public WatchRequest addRootToWatch(@NotNull String rootPath, boolean toWatchRecursively) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
+36
-10
@@ -28,22 +28,36 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class SymLinkHandlingTest extends LightPlatformTestCase {
|
||||
private LocalFileSystem myFileSystem;
|
||||
|
||||
@SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
|
||||
public SymLinkHandlingTest() {
|
||||
PlatformTestCase.initPlatformLangPrefix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
myFileSystem = LocalFileSystem.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
myFileSystem = null;
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public void testBadLinksAreIgnored() throws Exception {
|
||||
if (!SystemInfo.areSymLinksSupported) return;
|
||||
|
||||
final File missingFile = new File(FileUtil.getTempDirectory(), "missing_file");
|
||||
assertTrue(missingFile.getAbsolutePath(), !missingFile.exists() || missingFile.delete());
|
||||
final File missingLinkFile = createTempLink(missingFile.getAbsolutePath(), "missing_link");
|
||||
final VirtualFile missingLinkVFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(missingLinkFile);
|
||||
final VirtualFile missingLinkVFile = refreshAndFind(missingLinkFile);
|
||||
assertNull(missingLinkVFile);
|
||||
|
||||
final File selfLinkFile = createTempLink("self_link", "self_link");
|
||||
final VirtualFile selfLinkVFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(selfLinkFile);
|
||||
final VirtualFile selfLinkVFile = refreshAndFind(selfLinkFile);
|
||||
assertNull(selfLinkVFile);
|
||||
}
|
||||
|
||||
@@ -52,27 +66,27 @@ public class SymLinkHandlingTest extends LightPlatformTestCase {
|
||||
|
||||
final File targetFile = FileUtil.createTempFile("target", "");
|
||||
final File linkFile = createTempLink(targetFile.getAbsolutePath(), "link");
|
||||
final VirtualFile linkVFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(linkFile);
|
||||
final VirtualFile linkVFile = refreshAndFind(linkFile);
|
||||
assertTrue("link=" + linkFile + ", vLink=" + linkVFile, linkVFile != null && !linkVFile.isDirectory() && linkVFile.isSymLink());
|
||||
|
||||
assertTrue(targetFile.getAbsolutePath(), targetFile.setWritable(true, false) && targetFile.canWrite());
|
||||
linkVFile.refresh(false, false);
|
||||
refresh();
|
||||
assertTrue(linkVFile.getPath(), linkVFile.isWritable());
|
||||
assertTrue(targetFile.getAbsolutePath(), targetFile.setWritable(false, false) && !targetFile.canWrite());
|
||||
linkVFile.refresh(false, false);
|
||||
refresh();
|
||||
assertFalse(linkVFile.getPath(), linkVFile.isWritable());
|
||||
|
||||
final File targetDir = FileUtil.createTempDirectory("targetDir", "");
|
||||
final File linkDir = createTempLink(targetDir.getAbsolutePath(), "linkDir");
|
||||
final VirtualFile linkVDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(linkDir);
|
||||
final VirtualFile linkVDir = refreshAndFind(linkDir);
|
||||
assertTrue("link=" + linkDir + ", vLink=" + linkVDir, linkVDir != null && linkVDir.isDirectory() && linkVDir.isSymLink());
|
||||
|
||||
if (!SystemInfo.isWindows) {
|
||||
assertTrue(targetDir.getAbsolutePath(), targetDir.setWritable(true, false) && targetDir.canWrite());
|
||||
linkVDir.refresh(false, true);
|
||||
refresh();
|
||||
assertTrue(linkVDir.getPath(), linkVDir.isWritable());
|
||||
assertTrue(targetDir.getAbsolutePath(), targetDir.setWritable(false, false) && !targetDir.canWrite());
|
||||
linkVDir.refresh(false, true);
|
||||
refresh();
|
||||
assertFalse(linkVDir.getPath(), linkVDir.isWritable());
|
||||
}
|
||||
else {
|
||||
@@ -85,7 +99,7 @@ public class SymLinkHandlingTest extends LightPlatformTestCase {
|
||||
|
||||
final File targetFile = FileUtil.createTempFile("target", "");
|
||||
final File linkFile = createTempLink(targetFile.getAbsolutePath(), "link");
|
||||
final VirtualFile linkVFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(linkFile);
|
||||
final VirtualFile linkVFile = refreshAndFind(linkFile);
|
||||
assertTrue("link=" + linkFile + ", vLink=" + linkVFile, linkVFile != null && !linkVFile.isDirectory() && linkVFile.isSymLink());
|
||||
|
||||
AccessToken token = ApplicationManager.getApplication().acquireWriteActionLock(getClass());
|
||||
@@ -103,7 +117,7 @@ public class SymLinkHandlingTest extends LightPlatformTestCase {
|
||||
final File childFile = new File(targetDir, "child.txt");
|
||||
assertTrue(childFile.getAbsolutePath(), childFile.exists() || childFile.createNewFile());
|
||||
final File linkDir = createTempLink(targetDir.getAbsolutePath(), "linkDir");
|
||||
final VirtualFile linkVDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(linkDir);
|
||||
final VirtualFile linkVDir = refreshAndFind(linkDir);
|
||||
assertTrue("link=" + linkDir + ", vLink=" + linkVDir,
|
||||
linkVDir != null && linkVDir.isDirectory() && linkVDir.isSymLink() && linkVDir.getChildren().length == 1);
|
||||
|
||||
@@ -143,4 +157,16 @@ public class SymLinkHandlingTest extends LightPlatformTestCase {
|
||||
assertEquals("target=" + target + ", link=" + linkFile, targetFile.exists(), linkFile.exists());
|
||||
return linkFile;
|
||||
}
|
||||
|
||||
private VirtualFile refreshAndFind(final File ioFile) {
|
||||
refresh();
|
||||
return myFileSystem.findFileByPath(ioFile.getAbsolutePath());
|
||||
}
|
||||
|
||||
private void refresh() {
|
||||
final String tempPath = FileUtil.getTempDirectory();
|
||||
final VirtualFile tempDir = myFileSystem.findFileByPath(tempPath);
|
||||
assertNotNull(tempPath, tempDir);
|
||||
tempDir.refresh(false, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,10 +74,9 @@ public class UIUtil {
|
||||
|
||||
JComponent c = (JComponent)comp;
|
||||
|
||||
if (SystemInfo.isMac) {
|
||||
if (isUnderAquaLookAndFeel()) {
|
||||
c.putClientProperty("JComponent.sizeVariant", style == Style.REGULAR ? "regular" : style == Style.SMALL ? "small" : "mini");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
c.setFont(getFont(style == Style.REGULAR ? FontSize.NORMAL : style == Style.SMALL ? FontSize.SMALL : FontSize.MINI, c.getFont()));
|
||||
}
|
||||
Container p = c.getParent();
|
||||
@@ -260,9 +259,9 @@ public class UIUtil {
|
||||
|
||||
switch (size) {
|
||||
case SMALL:
|
||||
return base.deriveFont(defFont.getSize() * (SystemInfo.isMac ? 0.85f: 0.8f));
|
||||
return base.deriveFont(defFont.getSize() - 2f);
|
||||
case MINI:
|
||||
return base.deriveFont(defFont.getSize() * 0.7f);
|
||||
return base.deriveFont(defFont.getSize() - 4f);
|
||||
default:
|
||||
return base.deriveFont(defFont.getSize());
|
||||
}
|
||||
@@ -270,12 +269,13 @@ public class UIUtil {
|
||||
|
||||
@NotNull
|
||||
public static Font getBorderFont(@NotNull UIUtil.FontSize size, boolean isBold) {
|
||||
Font defFont = UIUtil.getBorderFont();
|
||||
Font defFont = getBorderFont();
|
||||
if (size == UIUtil.FontSize.SMALL) {
|
||||
defFont = defFont.deriveFont(defFont.getSize() - 2f);
|
||||
if (isBold) {
|
||||
return defFont.deriveFont((float)Math.max(defFont.getSize() - 2, 11)).deriveFont(Font.BOLD);
|
||||
defFont = defFont.deriveFont(Font.BOLD);
|
||||
}
|
||||
return defFont.deriveFont((float)Math.max(defFont.getSize() - 2, 11));
|
||||
return defFont;
|
||||
}
|
||||
if (isBold) {
|
||||
return defFont.deriveFont(Font.BOLD);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="430" height="330"/>
|
||||
<xy x="20" y="20" width="707" height="413"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -66,6 +66,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.ui.ComboboxWithBrowseButton"/>
|
||||
<labelLocation value="West"/>
|
||||
<text value="&Prefer Android Virtual Device for deployment"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -101,6 +102,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.ui.RawCommandLineEditor"/>
|
||||
<labelLocation value="West"/>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.command.line.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.android.run.testing.TestRunParameters">
|
||||
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="5" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="10">
|
||||
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="5" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="475" height="272"/>
|
||||
<xy x="20" y="20" width="475" height="187"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="cacd8" class="javax.swing.JRadioButton" binding="myAllInPackageButton">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="92" height="45"/>
|
||||
</grid>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<actionCommand resource-bundle="messages/ExecutionBundle" key="jnit.configuration.all.tests.in.package.radio"/>
|
||||
@@ -21,9 +19,7 @@
|
||||
</component>
|
||||
<component id="45298" class="javax.swing.JRadioButton" binding="myClassButton">
|
||||
<constraints>
|
||||
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="52" height="45"/>
|
||||
</grid>
|
||||
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<actionCommand resource-bundle="messages/ExecutionBundle" key="junit.configuration.test.class.radio"/>
|
||||
@@ -34,9 +30,7 @@
|
||||
</component>
|
||||
<component id="43d58" class="javax.swing.JRadioButton" binding="myTestMethodButton">
|
||||
<constraints>
|
||||
<grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="63" height="45"/>
|
||||
</grid>
|
||||
<grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<actionCommand resource-bundle="messages/ExecutionBundle" key="junit.configuration.test.method.radio"/>
|
||||
@@ -47,7 +41,7 @@
|
||||
<component id="23c94" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="29" height="45"/>
|
||||
<preferred-size width="29" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
@@ -109,6 +103,7 @@
|
||||
<properties>
|
||||
<componentClass value="com.intellij.openapi.ui.TextFieldWithBrowseButton"/>
|
||||
<enabled value="true"/>
|
||||
<labelLocation value="West"/>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.test.run.configuration.instrumentation.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
|
||||
@@ -141,7 +141,9 @@ public class PluginRunConfigurationEditor extends SettingsEditor<PluginRunConfig
|
||||
myProgramParameters.setComponent(new RawCommandLineEditor());
|
||||
myProgramParameters.getComponent().setDialogCaption(myProgramParameters.getRawText());
|
||||
myProgramParameters.setLabelLocation(BorderLayout.WEST);
|
||||
myVMParameters.setLabelPreferredSize(new Dimension(myProgramParameters.getLabelPreferredSize().width - 4, myProgramParameters.getLabelPreferredSize().height));
|
||||
|
||||
myProgramParameters.setLabelPreferredSize(myProgramParameters.getLabelPreferredSize());
|
||||
myVMParameters.setLabelPreferredSize(myProgramParameters.getLabelPreferredSize());
|
||||
|
||||
|
||||
GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<component id="bb2b7" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="144" height="-1"/>
|
||||
<preferred-size width="145" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
@@ -79,6 +79,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="145" height="16"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
|
||||
+5
-11
@@ -55,7 +55,6 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<selected value="false"/>
|
||||
<text resource-bundle="org/jetbrains/plugins/groovy/GroovyBundle" key="debug.option"/>
|
||||
</properties>
|
||||
</component>
|
||||
<hspacer id="317a0">
|
||||
@@ -71,13 +70,12 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="145" height="16"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5f62b" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="144" height="-1"/>
|
||||
</grid>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Script Parameters:"/>
|
||||
@@ -85,9 +83,7 @@
|
||||
</component>
|
||||
<component id="c5c05" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="144" height="-1"/>
|
||||
</grid>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="VM Options:"/>
|
||||
@@ -95,9 +91,7 @@
|
||||
</component>
|
||||
<component id="86e25" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="144" height="-1"/>
|
||||
</grid>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="d1e7d"/>
|
||||
@@ -113,7 +107,7 @@
|
||||
<component id="5194" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="144" height="-1"/>
|
||||
<preferred-size width="145" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
|
||||
+32
@@ -8,6 +8,8 @@ import com.intellij.psi.scope.PsiScopeProcessor;
|
||||
import com.intellij.util.containers.MultiMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.plugins.groovy.lang.groovydoc.psi.api.GrDocComment;
|
||||
import org.jetbrains.plugins.groovy.lang.groovydoc.psi.api.GrDocTag;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElement;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElementFactory;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrField;
|
||||
@@ -26,6 +28,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class DynamicMemberUtils {
|
||||
|
||||
public static final Key<Map<String, String>> COMMENT_KEY = Key.create("DynamicMemberUtils:COMMENT_KEY");
|
||||
|
||||
private static final Key<ConcurrentHashMap<String, ClassMemberHolder>> KEY = Key.create("DynamicMemberUtils");
|
||||
|
||||
private DynamicMemberUtils() {
|
||||
@@ -82,6 +86,20 @@ public class DynamicMemberUtils {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean checkVersion(PsiMethod method, String grailsVersion) {
|
||||
String since = getCommentValue(method, "@since");
|
||||
if (since == null) return true;
|
||||
|
||||
return grailsVersion.compareTo(since) >= 0;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getCommentValue(PsiMethod method, String commentTagName) {
|
||||
Map<String, String> commentMap = method.getUserData(COMMENT_KEY);
|
||||
if (commentMap == null) return null;
|
||||
return commentMap.get(commentTagName);
|
||||
}
|
||||
|
||||
public static class ClassMemberHolder {
|
||||
private final String myClassSource;
|
||||
|
||||
@@ -140,6 +158,20 @@ public class DynamicMemberUtils {
|
||||
for (GrMethod method : psiClass.getGroovyMethods()) {
|
||||
PsiMethod dynamicMethod = new GrDynamicMethodWithCache(method, classSource);
|
||||
|
||||
GrDocComment comment = method.getDocComment();
|
||||
if (comment != null) {
|
||||
Map<String, String> commentMap = new HashMap<String, String>();
|
||||
for (GrDocTag tag : comment.getTags()) {
|
||||
String tagText = tag.getText().trim();
|
||||
String valueText = tag.getValueElement().getText().trim();
|
||||
assert tagText.endsWith(valueText);
|
||||
|
||||
commentMap.put(tagText.substring(0, tagText.length() - valueText.length()).trim(), valueText);
|
||||
}
|
||||
|
||||
dynamicMethod.putUserData(COMMENT_KEY, commentMap);
|
||||
}
|
||||
|
||||
multiMap.putValue(null, dynamicMethod);
|
||||
multiMap.putValue(method.getName(), dynamicMethod);
|
||||
|
||||
|
||||
+7
-2
@@ -224,7 +224,9 @@
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<properties>
|
||||
<labelsPreferredSize width="213" height="16"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="350c9" class="com.intellij.openapi.ui.LabeledComponent" binding="myModule">
|
||||
<constraints>
|
||||
@@ -235,6 +237,7 @@
|
||||
<enabled value="true"/>
|
||||
<labelInsets top="7" left="0" bottom="2" right="0"/>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="213" height="25"/>
|
||||
<text resource-bundle="messages/ExecutionBundle" key="junit.configuration.use.classpath.and.jdk.of.module.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -242,7 +245,9 @@
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<properties>
|
||||
<checkBoxPreferredSize width="213" height="23"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
|
||||
+32
-8
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.idea.maven.project.MavenEnvironmentForm">
|
||||
<grid id="27dc6" binding="panel" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="27dc6" binding="panel" layout-manager="GridLayoutManager" row-count="6" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="434" height="172"/>
|
||||
<xy x="20" y="20" width="568" height="225"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -14,21 +14,25 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.openapi.ui.TextFieldWithBrowseButton"/>
|
||||
<text value="Maven &home directory (M2_HOME is used by default)"/>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="190" height="16"/>
|
||||
<text value="Maven &home directory"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7c064" class="com.intellij.openapi.ui.LabeledComponent" binding="settingsFileComponent">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.openapi.ui.TextFieldWithBrowseButton"/>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="190" height="16"/>
|
||||
<text value="User &settings file"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="3d84d" class="javax.swing.JCheckBox" binding="settingsOverrideCheckBox">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="6" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="6" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Override"/>
|
||||
@@ -44,26 +48,46 @@
|
||||
</component>
|
||||
<vspacer id="9e56d">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<component id="fa492" class="com.intellij.openapi.ui.LabeledComponent" binding="localRepositoryComponent">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.openapi.ui.TextFieldWithBrowseButton"/>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="190" height="16"/>
|
||||
<text value="Local &repository"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="d8828" class="javax.swing.JCheckBox" binding="localRepositoryOverrideCheckBox">
|
||||
<constraints>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="6" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="6" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Override"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="4becc" class="com.intellij.ui.components.JBLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="5" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<style value="SMALL"/>
|
||||
<text value="M2_HOME is used by default"/>
|
||||
</properties>
|
||||
</component>
|
||||
<vspacer id="7e28">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="-1" height="15"/>
|
||||
<preferred-size width="-1" height="15"/>
|
||||
<maximum-size width="-1" height="15"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
|
||||
+10
-7
@@ -3,7 +3,7 @@
|
||||
<grid id="27dc6" binding="panel" layout-manager="GridLayoutManager" row-count="11" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="455" height="436"/>
|
||||
<xy x="20" y="20" width="455" height="451"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -16,7 +16,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="ca510"/>
|
||||
<text value="Output &level"/>
|
||||
<text value="Output &level:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="ca510" class="javax.swing.JComboBox" binding="outputLevelCombo">
|
||||
@@ -31,7 +31,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="14e1e"/>
|
||||
<text value="&Checksum policy"/>
|
||||
<text value="&Checksum policy:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="14e1e" class="javax.swing.JComboBox" binding="checksumPolicyCombo">
|
||||
@@ -42,11 +42,14 @@
|
||||
</component>
|
||||
<component id="83fac" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="190" height="-1"/>
|
||||
<preferred-size width="190" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="c58ed"/>
|
||||
<text value="Multiproject build &fail policy"/>
|
||||
<text value="Multiproject build &fail policy:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="c58ed" class="javax.swing.JComboBox" binding="failPolicyCombo">
|
||||
@@ -61,7 +64,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="4e889"/>
|
||||
<text value="&Plugin update policy"/>
|
||||
<text value="&Plugin update policy:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="4e889" class="javax.swing.JComboBox" binding="pluginUpdatePolicyCombo">
|
||||
@@ -128,7 +131,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="4e889"/>
|
||||
<text value="&Snapshot update policy"/>
|
||||
<text value="&Snapshot update policy:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5b29b" class="javax.swing.JComboBox" binding="snapshotUpdatePolicyCombo">
|
||||
|
||||
+10
-6
@@ -49,7 +49,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="108" height="16"/>
|
||||
<labelPreferredSize width="109" height="16"/>
|
||||
<text value="M&ethod"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -59,7 +59,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="108" height="16"/>
|
||||
<labelPreferredSize width="109" height="16"/>
|
||||
<text value="&Suite"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -85,7 +85,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="108" height="16"/>
|
||||
<labelPreferredSize width="109" height="16"/>
|
||||
<text value="Packa&ge"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -124,7 +124,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="108" height="16"/>
|
||||
<labelPreferredSize width="109" height="16"/>
|
||||
<text value="&Class"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -134,6 +134,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="109" height="16"/>
|
||||
<text value="&Output directory"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -143,7 +144,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="108" height="16"/>
|
||||
<labelPreferredSize width="109" height="16"/>
|
||||
<text value="&Group"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -172,6 +173,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelLocation value="West"/>
|
||||
<labelPreferredSize width="213" height="16"/>
|
||||
<text value="Use classpath and JDK of m&odule"/>
|
||||
</properties>
|
||||
</component>
|
||||
@@ -179,7 +181,9 @@
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<properties>
|
||||
<checkBoxPreferredSize width="213" height="23"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="f5de" binding="commonParametersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
|
||||
+1
@@ -119,6 +119,7 @@ public class TestNGConfigurationEditor extends SettingsEditor<TestNGConfiguratio
|
||||
createView();
|
||||
moduleSelector = new ConfigurationModuleSelector(project, getModulesComponent());
|
||||
commonJavaParameters.setModuleContext(moduleSelector.getModule());
|
||||
commonJavaParameters.setLabelsPreferredSize(moduleClasspath.getLabelPreferredSize());
|
||||
moduleClasspath.getComponent().addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
commonJavaParameters.setModuleContext(moduleSelector.getModule());
|
||||
|
||||
@@ -42,7 +42,7 @@ public class RngXmlHighlightingTest extends HighlightingTestBase {
|
||||
final ExternalResourceManagerEx m = ExternalResourceManagerEx.getInstanceEx();
|
||||
m.addResource("urn:test:simple.rng", toAbsolutePath("highlighting/simple.rng"));
|
||||
m.addResource("urn:test:addressBook", toAbsolutePath("highlighting/rnc/addressbook.rnc"));
|
||||
m.addResource("http://www.w3.org/1999/XSL/Transform", toAbsolutePath("highlighting/relaxng.rng"));
|
||||
//m.addResource("http://www.w3.org/1999/XSL/Transform", toAbsolutePath("highlighting/relaxng.rng"));
|
||||
m.addResource("http://www.w3.org/1999/XSL/Format", toAbsolutePath("highlighting/rnc/fo/main.rnc"));
|
||||
m.addResource("http://docbook.org/ns/docbook", toAbsolutePath("highlighting/docbook.rng"));
|
||||
m.addResource("urn:intelliForm:AttachmentFilter", toAbsolutePath("highlighting/attachment-filter.rng"));
|
||||
|
||||
Reference in New Issue
Block a user