com.intellij.util.xmlb.annotations.Transient Java Examples

The following examples show how to use com.intellij.util.xmlb.annotations.Transient. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Config.java    From leetcode-editor with Apache License 2.0 6 votes vote down vote up
@Transient
public void setFormatLevelColour(Color... colors) {
    String levelColour = "";
    if (colors != null && colors.length > 0) {
        for (Color color : colors) {
            String R = Integer.toHexString(color.getRed());
            R = R.length() < 2 ? ('0' + R) : R;
            String G = Integer.toHexString(color.getGreen());
            G = G.length() < 2 ? ('0' + G) : G;
            String B = Integer.toHexString(color.getBlue());
            B = B.length() < 2 ? ('0' + B) : B;

            levelColour = levelColour + '#' + R + G + B + ";";
        }
    }
    this.levelColour = levelColour;
}
 
Example #2
Source File: PluginPersistentStateComponent.java    From StringManipulation with Apache License 2.0 6 votes vote down vote up
@Transient
public void addToHistory(ColumnAlignerModel columnAlignerModel) {
	List<ColumnAlignerModel> newList = new ArrayList<ColumnAlignerModel>(columnAlignerHistory.size() + 1);

	int startIndex = columnAlignerHistory.size() >= LIMIT ? 1 : 0;
	for (int i = startIndex; i < columnAlignerHistory.size(); i++) {
		ColumnAlignerModel alignerModel = columnAlignerHistory.get(i);
		if (!alignerModel.equals(columnAlignerModel)) {
			newList.add(alignerModel);
		}
	}

	columnAlignerModel.setAdded(new Date());
	newList.add(columnAlignerModel);

	columnAlignerHistory = newList;
}
 
Example #3
Source File: KeyPromoterStatistics.java    From IntelliJ-Key-Promoter-X with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Transient
public void registerAction(KeyPromoterAction action) {
  synchronized (statistics) {
    statistics.putIfAbsent(action.getDescription(), new StatisticsItem(action));
    statistics.get(action.getDescription()).registerEvent();
  }
  myChangeSupport.firePropertyChange(STATISTIC, null, null);
}
 
Example #4
Source File: CommitCompletionConfig.java    From GitToolBox with Apache License 2.0 5 votes vote down vote up
@Transient
public String getPresentableText() {
  if (type == CommitCompletionType.SIMPLE) {
    return "Branch name";
  } else if (type == CommitCompletionType.PATTERN) {
    return pattern;
  } else {
    throw new IllegalStateException("Unsupported type " + type);
  }
}
 
Example #5
Source File: CommitCompletionConfig.java    From GitToolBox with Apache License 2.0 5 votes vote down vote up
@Transient
public Formatter createFormatter() {
  if (type == CommitCompletionType.SIMPLE) {
    return SimpleFormatter.INSTANCE;
  } else if (type == CommitCompletionType.PATTERN) {
    return RegExpFormatter.create(pattern);
  } else {
    throw new IllegalStateException("Unsupported type " + type);
  }
}
 
Example #6
Source File: CustomActionModel.java    From StringManipulation with Apache License 2.0 5 votes vote down vote up
@Transient
public Style getStyleAsEnum() {
	try {
		return valueOf(style);
	} catch (Exception e) {
		return null;
	}
}
 
Example #7
Source File: KeyPromoterStatistics.java    From IntelliJ-Key-Promoter-X with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Puts an item from the suppress list back into the statistics.
 *
 * @param item Item to unsuppress
 */
@Transient
void unsuppressItem(StatisticsItem item) {
  final StatisticsItem statisticsItem = suppressed.remove(item.getDescription());
  if (statisticsItem != null && statisticsItem.count > 0) {
    statistics.putIfAbsent(statisticsItem.getDescription(), statisticsItem);
  }
  myChangeSupport.firePropertyChange(SUPPRESS, null, null);
  myChangeSupport.firePropertyChange(STATISTIC, null, null);
}
 
Example #8
Source File: ColumnAlignerModel.java    From StringManipulation with Apache License 2.0 5 votes vote down vote up
@Transient
public Integer getMaxSeparatorsPerLineAsInt() {
	Integer integer = null;
	try {
		integer = Integer.valueOf(maxSeparatorsPerLine);
	} catch (Exception e) {
		integer = Integer.MAX_VALUE;
	}
	return integer;
}
 
Example #9
Source File: SvnToolBoxAppState.java    From SVNToolBox with Apache License 2.0 5 votes vote down vote up
@Transient
public Color getCurrentRegularDecorationColor() {
    if (customRegularColor) {
        return getRegularDecorationColor();
    } else {
        return defaultRegularColor;
    }
}
 
Example #10
Source File: KeyPromoterStatistics.java    From IntelliJ-Key-Promoter-X with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Transient
public void suppressItem(KeyPromoterAction action) {
  StatisticsItem removed;
  synchronized (statistics) {
    removed = statistics.remove(action.getDescription());
    removed = removed == null ? new StatisticsItem(action) : removed;
  }
  synchronized (suppressed) {
    suppressed.putIfAbsent(action.getDescription(), removed);
  }
  myChangeSupport.firePropertyChange(SUPPRESS, null, null);
  myChangeSupport.firePropertyChange(STATISTIC, null, null);
}
 
Example #11
Source File: KeyPromoterStatistics.java    From IntelliJ-Key-Promoter-X with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Transient
public void resetStatistic() {
  synchronized (statistics) {
    statistics.clear();
  }
  myChangeSupport.firePropertyChange(STATISTIC, null, null);
}
 
Example #12
Source File: SvnToolBoxAppState.java    From SVNToolBox with Apache License 2.0 5 votes vote down vote up
@Transient
public Color getCurrentDarkDecorationColor() {
    if (customDarkColor) {
        return getDarkDecorationColor();
    } else {
        return defaultDarkColor;
    }
}
 
Example #13
Source File: ApplicationSettings.java    From MavenHelper with Apache License 2.0 5 votes vote down vote up
@Transient
public static Aliases addDefaultAliases(Aliases aliases) {
	aliases.add(new Alias("$class$", CURRENT_CLASS_MACRO));
	aliases.add(new Alias("$classWithMethod$", CURRENT_CLASS_WITH_METHOD_MACRO));
	aliases.add(new Alias("$fullClass$", CURRENT_FULL_CLASS_MACRO));
	aliases.add(new Alias("$fullClassWithMethod$", CURRENT_FULL_CLASS_WITH_METHOD_MACRO));
	return aliases;
}
 
Example #14
Source File: ApplicationSettings.java    From MavenHelper with Apache License 2.0 5 votes vote down vote up
@Transient
public List<Goal> getAllGoals() {
	List<Goal> allGoals = new ArrayList<Goal>(goals.size() + pluginAwareGoals.size());
	allGoals.addAll(goals.getGoals());
	allGoals.addAll(pluginAwareGoals.getGoals());
	return allGoals;
}
 
Example #15
Source File: ApplicationSettings.java    From MavenHelper with Apache License 2.0 5 votes vote down vote up
@Transient
public List<String> getAllGoalsAsString() {
	List<String> strings = new ArrayList<String>();
	List<Goal> allGoals = getAllGoals();
	for (Goal allGoal : allGoals) {
		strings.add(allGoal.getCommandLine());
	}
	return strings;
}
 
Example #16
Source File: HttpConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Transient
public void setProxyLogin(String login) {
  storeSecure("proxy.login", login);
}
 
Example #17
Source File: InspectionProfileImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@javax.annotation.Nullable
@Transient
public String[] getScopesOrder() {
  return myScopesOrder;
}
 
Example #18
Source File: InspectionProfileImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Transient
public boolean isProfileLocked() {
  return myLockedProfile;
}
 
Example #19
Source File: HttpConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Transient
public void setPlainProxyPassword(String password) {
  storeSecure("proxy.password", password);
}
 
Example #20
Source File: HttpConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Transient
@Nullable
public String getPlainProxyPassword() {
  return getSecure("proxy.password");
}
 
Example #21
Source File: FindSettingsImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Transient
public String getFileMask() {
  return FILE_MASK;
}
 
Example #22
Source File: InspectionProfileImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Transient
public HighlightDisplayLevel getErrorLevel(@Nonnull HighlightDisplayKey key, NamedScope scope, Project project) {
  final ToolsImpl tools = getTools(key.toString(), project);
  return tools != null ? tools.getLevel(scope, project) : HighlightDisplayLevel.WARNING;
}
 
Example #23
Source File: ProfileEx.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Transient
public boolean isLocal() {
  return !myIsProjectLevel;
}
 
Example #24
Source File: ProfileEx.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Transient
public boolean isProjectLevel() {
  return myIsProjectLevel;
}
 
Example #25
Source File: ProfileEx.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
@Transient
public ProfileManager getProfileManager() {
  return myProfileManager;
}
 
Example #26
Source File: RemoteCredentials.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Transient
String getUserName();
 
Example #27
Source File: RemoteCredentials.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Transient
String getPassphrase();
 
Example #28
Source File: RemoteCredentialsHolder.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Transient
public String getUserName() {
  return myUserName;
}
 
Example #29
Source File: RemoteCredentialsHolder.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Transient
public String getPassphrase() {
  return myPassphrase;
}
 
Example #30
Source File: RunConfigurationModule.java    From consulo with Apache License 2.0 4 votes vote down vote up
@javax.annotation.Nullable
@Transient
public Module getModule() {
  return myModulePointer != null ? myModulePointer.get() : null;
}