conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.model.Animal;
/**
* Dog
*/
public class Dog extends Animal {
@JsonProperty("breed")
private String breed = null;
public Dog breed(String breed) {
this.breed = breed;
return this;
}
/**
* Get breed
* @return breed
**/
@JsonProperty("breed")
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
=======
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.model.Animal;
import javax.validation.constraints.*;
/**
* Dog
*/
public class Dog extends Animal {
@JsonProperty("breed")
private String breed = null;
public Dog breed(String breed) {
this.breed = breed;
return this;
}
/**
* Get breed
* @return breed
**/
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
>>>>>>>
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.model.Animal;
import javax.validation.constraints.*;
/**
* Dog
*/
public class Dog extends Animal {
@JsonProperty("breed")
private String breed = null;
public Dog breed(String breed) {
this.breed = breed;
return this;
}
/**
* Get breed
* @return breed
**/
@JsonProperty("breed")
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
} |
<<<<<<<
startKeepAliveService();
new Thread(new Runnable() {
=======
Thread t = new Thread(new Runnable() {
>>>>>>>
new Thread(new Runnable() { |
<<<<<<<
if (Config.OTHERPROFILES) pluginsList.add(SimpleProfilePlugin.getPlugin());
if (Config.OTHERPROFILES) pluginsList.add(LocalProfilePlugin.INSTANCE);
=======
if (!Config.NSCLIENT) pluginsList.add(SimpleProfilePlugin.getPlugin());
if (!Config.NSCLIENT) pluginsList.add(LocalProfilePlugin.getPlugin());
>>>>>>>
if (!Config.NSCLIENT) pluginsList.add(SimpleProfilePlugin.getPlugin());
if (!Config.NSCLIENT) pluginsList.add(LocalProfilePlugin.INSTANCE); |
<<<<<<<
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
=======
private static final int NOTIFICATION_ID = 31345;
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
>>>>>>>
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
private static final int NOTIFICATION_ID = 31345; |
<<<<<<<
if (batteryLevel == 1) {
mUploaderBattery.setTextColor(dividerBatteryOkColor);
=======
if (rawData.batteryLevel == 1) {
mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_uploaderBattery));
>>>>>>>
if (rawData.batteryLevel == 1) {
mUploaderBattery.setTextColor(dividerBatteryOkColor);
<<<<<<<
if (batteryLevel == 1) {
mUploaderBattery.setTextColor(dividerTxtColor);
=======
if (rawData.batteryLevel == 1) {
mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_midColor));
>>>>>>>
if (rawData.batteryLevel == 1) {
mUploaderBattery.setTextColor(dividerTxtColor); |
<<<<<<<
final String rscId, final String begin, final String end) throws ParseException, PermissionException;
public ResourceMeasurementBatchResponse getAggregatedMetricData(ApiMessageContext apiMessageContext, final ResourceMeasurementRequests hqMsmtReqs,
final String begin, final String end)
throws ParseException, PermissionException, UnsupportedOperationException, ObjectNotFoundException;
=======
final String rscId, final String begin, final String end) throws ParseException, PermissionException, UnsupportedOperationException, ObjectNotFoundException, IllegalArgumentException, TimeframeSizeException, TimeframeBoundriesException;
>>>>>>>
final String rscId, final String begin, final String end) throws ParseException, PermissionException, UnsupportedOperationException, ObjectNotFoundException, IllegalArgumentException, TimeframeSizeException, TimeframeBoundriesException;
public ResourceMeasurementBatchResponse getAggregatedMetricData(ApiMessageContext apiMessageContext, final ResourceMeasurementRequests hqMsmtReqs,
final String begin, final String end)
throws ParseException, PermissionException, UnsupportedOperationException, ObjectNotFoundException; |
<<<<<<<
public class NSProfileFragment extends SubscriberFragment implements AdapterView.OnItemSelectedListener {
private static NSProfilePlugin nsProfilePlugin = new NSProfilePlugin();
public static NSProfilePlugin getPlugin() {
return nsProfilePlugin;
}
private Spinner profileSpinner;
=======
public class NSProfileFragment extends SubscriberFragment {
>>>>>>>
public class NSProfileFragment extends SubscriberFragment implements AdapterView.OnItemSelectedListener {
private Spinner profileSpinner; |
<<<<<<<
import info.nightscout.androidaps.utils.T;
=======
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
>>>>>>>
import info.nightscout.androidaps.utils.T;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
<<<<<<<
Activity activity = getActivity();
if (activity != null)
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
recyclerView.swapAdapter(new RecyclerViewAdapter(MainApp.getDbHelper().getProfileSwitchData(DateUtil.now() - T.days(30).msecs(),false)), false);
}
});
=======
recyclerView.swapAdapter(new RecyclerViewAdapter(MainApp.getDbHelper().getProfileSwitchData(false)), false);
>>>>>>>
recyclerView.swapAdapter(new RecyclerViewAdapter(MainApp.getDbHelper().getProfileSwitchData(DateUtil.now() - T.days(30).msecs(),false)), false); |
<<<<<<<
if (batteryLevel == 1) {
mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), dividerMatchesBg ?
R.color.dark_midColor : R.color.dark_uploaderBattery));
=======
if (rawData.batteryLevel == 1) {
mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_uploaderBattery));
>>>>>>>
if (rawData.batteryLevel == 1) {
mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), dividerMatchesBg ?
R.color.dark_midColor : R.color.dark_uploaderBattery));
<<<<<<<
if (batteryLevel == 1) {
mUploaderBattery.setTextColor(dividerMatchesBg ? Color.BLACK : Color.WHITE);
=======
if (rawData.batteryLevel == 1) {
mUploaderBattery.setTextColor(Color.WHITE);
>>>>>>>
if (rawData.batteryLevel == 1) {
mUploaderBattery.setTextColor(dividerMatchesBg ? Color.BLACK : Color.WHITE);
<<<<<<<
mLinearLayout.setBackgroundColor(dividerMatchesBg ? Color.BLACK : Color.LTGRAY);
if (sgvLevel == 1) {
=======
mLinearLayout.setBackgroundColor(Color.LTGRAY);
if (rawData.sgvLevel == 1) {
>>>>>>>
mLinearLayout.setBackgroundColor(dividerMatchesBg ? Color.BLACK : Color.LTGRAY);
if (rawData.sgvLevel == 1) { |
<<<<<<<
import info.nightscout.androidaps.plugins.IobCobCalculator.AutosensData;
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
=======
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
>>>>>>>
import info.nightscout.androidaps.plugins.IobCobCalculator.AutosensData;
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; |
<<<<<<<
GenericAAPS("Generic AAPS", "AndroidAPS", "VirutalPump", 0.1d, null, //
new DoseSettings(0.05d, 30, 8*60, 0.05d), //
=======
GenericAAPS("Generic AAPS", 0.1d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
>>>>>>>
GenericAAPS("Generic AAPS", "AndroidAPS", "VirutalPump", 0.1d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
<<<<<<<
Cellnovo1("Cellnovo", "Cellnovo", "Cellnovo", 0.05d, null, //
new DoseSettings(0.05d, 30, 24*60, 1d, null),
=======
Cellnovo1("Cellnovo", 0.05d, null, //
new DoseSettings(0.05d, 30, 24 * 60, 1d, null),
>>>>>>>
Cellnovo1("Cellnovo", "Cellnovo", "Cellnovo", 0.05d, null, //
new DoseSettings(0.05d, 30, 24 * 60, 1d, null),
<<<<<<<
AccuChekCombo("Accu-Chek Combo", "Roche", "Combo", 0.1d, null, //
new DoseSettings(0.1d, 15, 12*60, 0.1d), //
=======
AccuChekCombo("Accu-Chek Combo", 0.1d, null, //
new DoseSettings(0.1d, 15, 12 * 60, 0.1d), //
>>>>>>>
AccuChekCombo("Accu-Chek Combo", "Roche", "Combo", 0.1d, null, //
new DoseSettings(0.1d, 15, 12 * 60, 0.1d), //
<<<<<<<
AccuChekSpirit("Accu-Chek Spirit", "Roche", "Spirit", 0.1d, null, //
new DoseSettings(0.1d, 15, 12*60, 0.1d), //
=======
AccuChekSpirit("Accu-Chek Spirit", 0.1d, null, //
new DoseSettings(0.1d, 15, 12 * 60, 0.1d), //
>>>>>>>
AccuChekSpirit("Accu-Chek Spirit", "Roche", "Spirit", 0.1d, null, //
new DoseSettings(0.1d, 15, 12 * 60, 0.1d), //
<<<<<<<
AccuChekInsight("Accu-Chek Insight", "Roche", "Insight", 0.05d, DoseStepSize.InsightBolus, //
new DoseSettings(0.05d, 15, 24*60, 0.05d), //
=======
AccuChekInsight("Accu-Chek Insight", 0.05d, DoseStepSize.InsightBolus, //
new DoseSettings(0.05d, 15, 24 * 60, 0.05d), //
>>>>>>>
AccuChekInsight("Accu-Chek Insight", "Roche", "Insight", 0.05d, DoseStepSize.InsightBolus, //
new DoseSettings(0.05d, 15, 24 * 60, 0.05d), //
<<<<<<<
AccuChekInsightBluetooth("Accu-Chek Insight", "Roche", "Insight", 0.01d, null, //
new DoseSettings(0.01d, 15, 24*60, 0.05d), //
=======
AccuChekInsightBluetooth("Accu-Chek Insight", 0.01d, null, //
new DoseSettings(0.01d, 15, 24 * 60, 0.05d), //
>>>>>>>
AccuChekInsightBluetooth("Accu-Chek Insight", "Roche", "Insight", 0.01d, null, //
new DoseSettings(0.01d, 15, 24 * 60, 0.05d), //
<<<<<<<
AnimasVibe("Animas Vibe","Animas", "Vibe", 0.05d, null, // AnimasBolus?
new DoseSettings(0.05d, 30, 12*60, 0.05d), //
=======
AnimasVibe("Animas Vibe", 0.05d, null, // AnimasBolus?
new DoseSettings(0.05d, 30, 12 * 60, 0.05d), //
>>>>>>>
AnimasVibe("Animas Vibe","Animas", "Vibe", 0.05d, null, // AnimasBolus?
new DoseSettings(0.05d, 30, 12 * 60, 0.05d), //
<<<<<<<
DanaR("DanaR", "SOOIL", "DanaR", 0.05d, null, //
new DoseSettings(0.05d, 30, 8*60, 0.05d), //
=======
DanaR("DanaR", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
>>>>>>>
DanaR("DanaR", "SOOIL", "DanaR", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
<<<<<<<
DanaRKorean("DanaR Korean", "SOOIL", "DanaRKorean", 0.05d, null, //
new DoseSettings(0.05d, 30, 8*60, 0.05d), //
=======
DanaRKorean("DanaR Korean", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
>>>>>>>
DanaRKorean("DanaR Korean", "SOOIL", "DanaRKorean", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
<<<<<<<
DanaRS("DanaRS", "SOOIL", "DanaRS", 0.05d, null, //
new DoseSettings(0.05d, 30, 8*60, 0.05d), //
=======
DanaRS("DanaRS", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
>>>>>>>
DanaRS("DanaRS", "SOOIL", "DanaRS", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
<<<<<<<
Insulet_Omnipod("Insulet Omnipod", "Insulet", "Omnipod", 0.05d, null, //
new DoseSettings(0.05d, 30, 8*60, 0.05d), //
=======
Insulet_Omnipod("Insulet Omnipod", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
>>>>>>>
Insulet_Omnipod("Insulet Omnipod", "Insulet", "Omnipod", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
<<<<<<<
Medtronic_512_712("Medtronic 512/712", "Medtronic", "512/712", 0.05d, null, //
new DoseSettings(0.05d, 30, 8*60, 0.05d), //
=======
Medtronic_512_712("Medtronic 512/712", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
>>>>>>>
Medtronic_512_712("Medtronic 512/712", "Medtronic", "512/712", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
<<<<<<<
Medtronic_523_723_Revel("Medtronic 523/723 (Revel)", "Medtronic", "523/723 (Revel)", 0.05d, null, //
new DoseSettings(0.05d, 30, 8*60, 0.05d), //
=======
Medtronic_523_723_Revel("Medtronic 523/723 (Revel)", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
>>>>>>>
Medtronic_523_723_Revel("Medtronic 523/723 (Revel)", "Medtronic", "523/723 (Revel)", 0.05d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
<<<<<<<
Medtronic_640G("Medtronic 640G", "Medtronic", "640G", 0.025d, null, //
new DoseSettings(0.05d, 30, 8*60, 0.05d), //
=======
Medtronic_640G("Medtronic 640G", 0.025d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
>>>>>>>
Medtronic_640G("Medtronic 640G", "Medtronic", "640G", 0.025d, null, //
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
<<<<<<<
TandemTSlim("Tandem t:slim", "Tandem", "t:slim", 0.01d, null, //
new DoseSettings(0.01d,15, 8*60, 0.4d),
=======
TandemTSlim("Tandem t:slim", 0.01d, null, //
new DoseSettings(0.01d, 15, 8 * 60, 0.4d),
>>>>>>>
TandemTSlim("Tandem t:slim", "Tandem", "t:slim", 0.01d, null, //
new DoseSettings(0.01d, 15, 8 * 60, 0.4d),
<<<<<<<
PumpType(String description, String model, PumpType parent)
{
=======
PumpType(String description, PumpType parent) {
>>>>>>>
PumpType(String description, String model, PumpType parent)
{
<<<<<<<
PumpType(String description, String model, PumpType parent, PumpCapability pumpCapability)
{
=======
PumpType(String description, PumpType parent, PumpCapability pumpCapability) {
>>>>>>>
PumpType(String description, String model, PumpType parent, PumpCapability pumpCapability)
{
<<<<<<<
PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, //
double baseBasalMinValue, double baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability)
{
this(description, manufacter, model, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, specialBasalDurations, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability);
=======
PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, //
double baseBasalMinValue, double baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability) {
this(description, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, specialBasalDurations, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability);
>>>>>>>
PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, //
double baseBasalMinValue, double baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability)
{
this(description, manufacter, model, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, specialBasalDurations, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability); |
<<<<<<<
private final PodStateManager podStateManager;
private OmnipodUtil omnipodUtil;
private AAPSLogger aapsLogger;
private RxBusWrapper rxBus;
private ResourceHelper resourceHelper;
private HasAndroidInjector injector;
private ActivePluginProvider activePlugin;
private OmnipodPumpStatus pumpStatus;
=======
private final OmnipodUtil omnipodUtil;
private final AAPSLogger aapsLogger;
private final RxBusWrapper rxBus;
private final ResourceHelper resourceHelper;
private final HasAndroidInjector injector;
private final ActivePluginProvider activePlugin;
private final OmnipodPumpStatus pumpStatus;
private final Context context;
>>>>>>>
private final PodStateManager podStateManager;
private final OmnipodUtil omnipodUtil;
private final AAPSLogger aapsLogger;
private final RxBusWrapper rxBus;
private final ResourceHelper resourceHelper;
private final HasAndroidInjector injector;
private final ActivePluginProvider activePlugin;
private final OmnipodPumpStatus pumpStatus;
private final Context context;
<<<<<<<
PodStateManager podStateManager,
OmnipodPumpStatus _pumpStatus,
=======
PodSessionState podState,
OmnipodPumpStatus pumpStatus,
>>>>>>>
PodStateManager podStateManager,
OmnipodPumpStatus pumpStatus,
<<<<<<<
ActivePluginProvider activePlugin) {
if (podStateManager == null) {
throw new IllegalArgumentException("Pod state manager can not be null");
}
this.podStateManager = podStateManager;
=======
ActivePluginProvider activePlugin,
Context context) {
>>>>>>>
ActivePluginProvider activePlugin,
Context context) {
if (podStateManager == null) {
throw new IllegalArgumentException("Pod state manager can not be null");
}
this.podStateManager = podStateManager; |
<<<<<<<
if (statuslightsLayout != null) {
if (SP.getBoolean(R.string.key_show_statuslights, false)) {
CareportalEvent careportalEvent;
NSSettingsStatus nsSettings = new NSSettingsStatus().getInstance();
double iageUrgent = nsSettings.getExtendedWarnValue("iage", "urgent", 96);
double iageWarn = nsSettings.getExtendedWarnValue("iage", "warn", 72);
double cageUrgent = nsSettings.getExtendedWarnValue("cage", "urgent", 72);
double cageWarn = nsSettings.getExtendedWarnValue("cage", "warn", 48);
double sageUrgent = nsSettings.getExtendedWarnValue("sage", "urgent", 166);
double sageWarn = nsSettings.getExtendedWarnValue("sage", "warn", 164);
//double pbageUrgent = nsSettings.getExtendedWarnValue("pgage", "urgent", 360);
//double pbageWarn = nsSettings.getExtendedWarnValue("pgage", "warn", 240);
double batUrgent = SP.getDouble(R.string.key_statuslights_bat_critical, 5.0);
double batWarn = SP.getDouble(R.string.key_statuslights_bat_warning, 25.0);
double resUrgent = SP.getDouble(R.string.key_statuslights_res_critical, 10.0);
double resWarn = SP.getDouble(R.string.key_statuslights_res_warning, 80.0);
if (cageView != null) {
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SITECHANGE);
double canAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE;
applyStatuslight(cageView, "CAN", canAge, cageWarn, cageUrgent, Double.MAX_VALUE, true);
}
if (iageView != null) {
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.INSULINCHANGE);
double insulinAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE;
applyStatuslight(iageView, "INS", insulinAge, iageWarn, iageUrgent, Double.MAX_VALUE, true);
}
if (reservoirView != null) {
double reservoirLevel = pump.isInitialized() ? pump.getReservoirLevel() : -1;
applyStatuslight(reservoirView, "RES", reservoirLevel, resWarn, resUrgent, -1, false);
}
if (sageView != null) {
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SENSORCHANGE);
double sensorAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE;
applyStatuslight(sageView, "SEN", sensorAge, sageWarn, sageUrgent, Double.MAX_VALUE, true);
}
if (batteryView != null) {
double batteryLevel = pump.isInitialized() ? pump.getBatteryLevel() : -1;
applyStatuslight(batteryView, "BAT", batteryLevel, batWarn, batUrgent, -1, false);
}
statuslightsLayout.setVisibility(View.VISIBLE);
} else {
statuslightsLayout.setVisibility(View.GONE);
}
}
final boolean predictionsAvailable = finalLastRun != null && finalLastRun.request.hasPredictions;
=======
boolean predictionsAvailable;
if (Config.APS)
predictionsAvailable = finalLastRun != null && finalLastRun.request.hasPredictions;
else if (Config.NSCLIENT)
predictionsAvailable = true;
else
predictionsAvailable = false;
final boolean finalPredictionsAvailable = predictionsAvailable;
>>>>>>>
if (statuslightsLayout != null) {
if (SP.getBoolean(R.string.key_show_statuslights, false)) {
CareportalEvent careportalEvent;
NSSettingsStatus nsSettings = new NSSettingsStatus().getInstance();
double iageUrgent = nsSettings.getExtendedWarnValue("iage", "urgent", 96);
double iageWarn = nsSettings.getExtendedWarnValue("iage", "warn", 72);
double cageUrgent = nsSettings.getExtendedWarnValue("cage", "urgent", 72);
double cageWarn = nsSettings.getExtendedWarnValue("cage", "warn", 48);
double sageUrgent = nsSettings.getExtendedWarnValue("sage", "urgent", 166);
double sageWarn = nsSettings.getExtendedWarnValue("sage", "warn", 164);
//double pbageUrgent = nsSettings.getExtendedWarnValue("pgage", "urgent", 360);
//double pbageWarn = nsSettings.getExtendedWarnValue("pgage", "warn", 240);
double batUrgent = SP.getDouble(R.string.key_statuslights_bat_critical, 5.0);
double batWarn = SP.getDouble(R.string.key_statuslights_bat_warning, 25.0);
double resUrgent = SP.getDouble(R.string.key_statuslights_res_critical, 10.0);
double resWarn = SP.getDouble(R.string.key_statuslights_res_warning, 80.0);
if (cageView != null) {
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SITECHANGE);
double canAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE;
applyStatuslight(cageView, "CAN", canAge, cageWarn, cageUrgent, Double.MAX_VALUE, true);
}
if (iageView != null) {
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.INSULINCHANGE);
double insulinAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE;
applyStatuslight(iageView, "INS", insulinAge, iageWarn, iageUrgent, Double.MAX_VALUE, true);
}
if (reservoirView != null) {
double reservoirLevel = pump.isInitialized() ? pump.getReservoirLevel() : -1;
applyStatuslight(reservoirView, "RES", reservoirLevel, resWarn, resUrgent, -1, false);
}
if (sageView != null) {
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SENSORCHANGE);
double sensorAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE;
applyStatuslight(sageView, "SEN", sensorAge, sageWarn, sageUrgent, Double.MAX_VALUE, true);
}
if (batteryView != null) {
double batteryLevel = pump.isInitialized() ? pump.getBatteryLevel() : -1;
applyStatuslight(batteryView, "BAT", batteryLevel, batWarn, batUrgent, -1, false);
}
statuslightsLayout.setVisibility(View.VISIBLE);
} else {
statuslightsLayout.setVisibility(View.GONE);
}
}
boolean predictionsAvailable;
if (Config.APS)
predictionsAvailable = finalLastRun != null && finalLastRun.request.hasPredictions;
else if (Config.NSCLIENT)
predictionsAvailable = true;
else
predictionsAvailable = false;
final boolean finalPredictionsAvailable = predictionsAvailable; |
<<<<<<<
AndroidPermission.notifyForSMSPermissions(this, smsCommunicatorPlugin);
=======
AndroidPermission.notifyForSMSPermissions(this);
AndroidPermission.notifyForSystemWindowPermissions(this);
>>>>>>>
AndroidPermission.notifyForSMSPermissions(this, smsCommunicatorPlugin);
AndroidPermission.notifyForSystemWindowPermissions(this); |
<<<<<<<
=======
import java.sql.Connection;
>>>>>>>
import java.sql.Connection; |
<<<<<<<
import org.hyperic.hq.api.model.ConfigurationOption;
import org.hyperic.hq.api.model.ConfigurationTemplate;
import org.hyperic.hq.api.model.Resource;
=======
import org.hyperic.hq.api.model.ResourceModel;
>>>>>>>
import org.hyperic.hq.api.model.ConfigurationOption;
import org.hyperic.hq.api.model.ConfigurationTemplate;
import org.hyperic.hq.api.model.ResourceModel;
<<<<<<<
@PUT
@Path("/search")
ResourceBatchResponse updateResourcesByCriteria(final Resource updateData) throws SessionNotFoundException, SessionTimeoutException ;
@DELETE
@Path("/registration")
public void unregister() throws SessionNotFoundException, SessionTimeoutException;
@GET
@Path("/{resourceID}/configuration-template")
public ConfigurationTemplate getConfigurationTemplate(@PathParam("resourceID") final String resourceID) throws SessionNotFoundException, SessionTimeoutException;
=======
@DELETE
@Path("/registration/{registrationID}")
public void unregister(@PathParam("registrationID") final String registrationID) throws SessionNotFoundException,
SessionTimeoutException;
>>>>>>>
@GET
@Path("/{resourceID}/configuration-template")
public ConfigurationTemplate getConfigurationTemplate(@PathParam("resourceID") final String resourceID) throws SessionNotFoundException, SessionTimeoutException;
@DELETE
@Path("/registration/{registrationID}")
public void unregister(@PathParam("registrationID") final String registrationID) throws SessionNotFoundException,
SessionTimeoutException; |
<<<<<<<
=======
import org.junit.Ignore;
import org.junit.Test;
>>>>>>>
import org.junit.Ignore;
import org.junit.Test;
<<<<<<<
//@Test
public void testLocale() {
Locale l = new Locale("en", "IE");
Locale.setDefault(l);
Date date = new Date();
System.out.println("Date: toLocaleString: " + date.toLocaleString());
System.out.println("Date: toString: " + date.toString());
System.out.println("Date: toGMTString: " + date.toGMTString());
for (String isoCountry : Locale.getISOCountries()) {
//System.out.println("ISO country: " + isoCountry);
}
}
=======
*/
>>>>>>>
*/
//@Test
public void testLocale() {
Locale l = new Locale("en", "IE");
Locale.setDefault(l);
Date date = new Date();
System.out.println("Date: toLocaleString: " + date.toLocaleString());
System.out.println("Date: toString: " + date.toString());
System.out.println("Date: toGMTString: " + date.toGMTString());
for (String isoCountry : Locale.getISOCountries()) {
//System.out.println("ISO country: " + isoCountry);
}
} |
<<<<<<<
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
=======
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.actions.ActionsPlugin;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
>>>>>>>
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.actions.ActionsPlugin;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
<<<<<<<
import info.nightscout.androidaps.plugins.general.careportal.Dialogs.NewNSTreatmentDialog;
=======
>>>>>>>
<<<<<<<
=======
private Map<String,CustomAction> pumpCustomActions = new HashMap<>();
private List<SingleClickButton> pumpCustomButtons = new ArrayList<>();
>>>>>>>
private Map<String,CustomAction> pumpCustomActions = new HashMap<>();
private List<SingleClickButton> pumpCustomButtons = new ArrayList<>();
<<<<<<<
if (!ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription().supportsTDDs)
tddStats.setVisibility(View.GONE);
else
tddStats.setVisibility(View.VISIBLE);
checkCustomActions();
=======
if (!pump.getPumpDescription().supportsTDDs)
tddStats.setVisibility(View.GONE);
else
tddStats.setVisibility(View.VISIBLE);
checkPumpCustomActions();
>>>>>>>
if (!pump.getPumpDescription().supportsTDDs)
tddStats.setVisibility(View.GONE);
else
tddStats.setVisibility(View.VISIBLE);
checkPumpCustomActions(); |
<<<<<<<
import info.nightscout.androidaps.plugins.OpenAPSSMB.OpenAPSSMBPlugin;
import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefFreePeakPlugin;
=======
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefFreePeakPlugin;
>>>>>>>
import info.nightscout.androidaps.plugins.OpenAPSSMB.OpenAPSSMBPlugin;
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefFreePeakPlugin; |
<<<<<<<
if (Config.VIRTUALPUMP) pluginsList.add(VirtualPumpPlugin.getInstance());
if (Config.LOOPENABLED) pluginsList.add(LoopPlugin.getPlugin());
if (Config.OPENAPSENABLED) pluginsList.add(OpenAPSMAPlugin.getPlugin());
if (Config.OPENAPSENABLED) pluginsList.add(OpenAPSAMAPlugin.getPlugin());
if (Config.OPENAPSENABLED) pluginsList.add(OpenAPSSMBPlugin.getPlugin());
=======
if (Config.VIRTUALPUMP) pluginsList.add(VirtualPumpPlugin.getPlugin());
if (Config.APS) pluginsList.add(LoopPlugin.getPlugin());
if (Config.APS) pluginsList.add(OpenAPSMAPlugin.getPlugin());
if (Config.APS) pluginsList.add(OpenAPSAMAPlugin.getPlugin());
>>>>>>>
if (Config.VIRTUALPUMP) pluginsList.add(VirtualPumpPlugin.getPlugin());
if (Config.APS) pluginsList.add(LoopPlugin.getPlugin());
if (Config.APS) pluginsList.add(OpenAPSMAPlugin.getPlugin());
if (Config.APS) pluginsList.add(OpenAPSAMAPlugin.getPlugin());
if (Config.APS) pluginsList.add(OpenAPSSMBPlugin.getPlugin()); |
<<<<<<<
apsModeView.setTextColor(MainApp.gc(R.color.ribbonTextWarning));
} else if (loopPlugin.isEnabled(PluginType.LOOP) && loopPlugin.isDisconnected()) {
apsModeView.setBackgroundColor(MainApp.gc(R.color.ribbonCritical));
=======
apsModeView.setTextColor(Color.WHITE);
} else if (loopPlugin.isDisconnected()) {
apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended));
>>>>>>>
apsModeView.setTextColor(MainApp.gc(R.color.ribbonTextWarning));
} else if (loopPlugin.isDisconnected()) {
apsModeView.setBackgroundColor(MainApp.gc(R.color.ribbonCritical)); |
<<<<<<<
unregisterActivityLifecycleCallbacks(TS.INSTANCE);
=======
if (mWakeLock != null && mWakeLock.isHeld())
mWakeLock.release();
>>>>>>>
unregisterActivityLifecycleCallbacks(TS.INSTANCE);
if (mWakeLock != null && mWakeLock.isHeld())
mWakeLock.release(); |
<<<<<<<
private final AAPSLogger aapsLogger;
private final RxBusWrapper rxBus;
private final ResourceHelper resourceHelper;
private final ConstraintChecker constraintChecker;
private final TreatmentsPlugin treatmentsPlugin;
private final SP sp;
private final CommandQueueProvider commandQueue;
=======
public static final String ALERT_CHANNEL_ID = "AndroidAPS-InsightAlert";
private static LocalInsightPlugin instance = null;
>>>>>>>
private final AAPSLogger aapsLogger;
private final RxBusWrapper rxBus;
private final ResourceHelper resourceHelper;
private final ConstraintChecker constraintChecker;
private final TreatmentsPlugin treatmentsPlugin;
private final SP sp;
private final CommandQueueProvider commandQueue;
public static final String ALERT_CHANNEL_ID = "AndroidAPS-InsightAlert"; |
<<<<<<<
public static ConfigBuilderPlugin configBuilderPlugin;
public static ProfileFunctions profileFunctions;
=======
public static ConstraintChecker constraintChecker;
>>>>>>>
public static ConfigBuilderPlugin configBuilderPlugin;
public static ProfileFunctions profileFunctions;
public static ConstraintChecker constraintChecker; |
<<<<<<<
/* No usable settings yet
if (Config.COMBO) {
addPreferencesFromResourceIfEnabled(ComboPlugin.getPlugin(), PluginBase.PUMP);
}
*/
addPreferencesFromResourceIfEnabled(VirtualPumpPlugin.getPlugin(), PluginBase.PUMP);
=======
if (!Config.NSCLIENT && !Config.G5UPLOADER) {
addPreferencesFromResourceIfEnabled(VirtualPumpPlugin.getPlugin(), PluginBase.PUMP);
}
>>>>>>>
if (!Config.NSCLIENT && !Config.G5UPLOADER) {
addPreferencesFromResourceIfEnabled(VirtualPumpPlugin.getPlugin(), PluginBase.PUMP);
}
/* No usable settings yet
if (Config.COMBO) {
addPreferencesFromResourceIfEnabled(ComboPlugin.getPlugin(), PluginBase.PUMP);
}
*/
addPreferencesFromResourceIfEnabled(VirtualPumpPlugin.getPlugin(), PluginBase.PUMP); |
<<<<<<<
.subscribe(event -> updatePumpStatus(event.getStatus(resourceHelper)),
exception -> FabricPrivacy.getInstance().logException(exception)
=======
.subscribe(event -> updatePumpStatus(event),
FabricPrivacy::logException
>>>>>>>
.subscribe(event -> updatePumpStatus(event),
exception -> FabricPrivacy.getInstance().logException(exception)
<<<<<<<
tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextWarning));
tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonWarning));
tempTargetView.setVisibility(View.VISIBLE);
=======
tempTargetView.setTextColor(MainApp.gc(R.color.ribbonTextWarning));
tempTargetView.setBackgroundColor(MainApp.gc(R.color.ribbonWarning));
>>>>>>>
tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextWarning));
tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonWarning));
<<<<<<<
if (showAcceptButton && pump.isInitialized() && !pump.isSuspended() && loopPlugin.isEnabled(PluginType.LOOP)) {
acceptTempLayout.setVisibility(View.VISIBLE);
acceptTempButton.setText(resourceHelper.gs(R.string.setbasalquestion) + "\n" + loopPlugin.lastRun.constraintsProcessed);
=======
if (showAcceptButton && pump.isInitialized() && !pump.isSuspended() && LoopPlugin.getPlugin().isEnabled(PluginType.LOOP)) {
acceptTempButton.setVisibility(View.VISIBLE);
acceptTempButton.setText(MainApp.gs(R.string.setbasalquestion) + "\n" + finalLastRun.constraintsProcessed);
>>>>>>>
if (showAcceptButton && pump.isInitialized() && !pump.isSuspended() && loopPlugin.isEnabled(PluginType.LOOP)) {
acceptTempButton.setVisibility(View.VISIBLE);
acceptTempButton.setText(resourceHelper.gs(R.string.setbasalquestion) + "\n" + loopPlugin.lastRun.constraintsProcessed); |
<<<<<<<
=======
private void refreshCustomActionsList() {
RxBus.INSTANCE.send(new EventCustomActionsChanged());
}
>>>>>>> |
<<<<<<<
import org.hyperic.hq.product.server.session.ProductManagerImpl;
import org.hyperic.hq.product.shared.ProductManager;
=======
import org.hyperic.hq.product.shared.ProductManagerLocal;
>>>>>>>
import org.hyperic.hq.product.shared.ProductManager;
<<<<<<<
protected static MeasurementPluginManager _mpm = null;
private DataManagerLocal _dataMan;
private AgentManager _agentMan;
private ProductManager _prodMan;
private AuthzSubjectManagerLocal _ssmLocal;
private TemplateManagerLocal _templateMan;
private SRNManagerLocal s_rnManager;
=======
protected static MeasurementPluginManager measurementPluginManager = null;
>>>>>>>
protected static MeasurementPluginManager measurementPluginManager = null;
<<<<<<<
if (_mpm == null) {
ProductManager ppm = this.getProductMan();
=======
if (measurementPluginManager == null) {
>>>>>>>
if (measurementPluginManager == null) { |
<<<<<<<
import info.nightscout.androidaps.plugins.source.GlimpPlugin;
=======
import info.nightscout.androidaps.plugins.source.SourceGlimpPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentService;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
>>>>>>>
import info.nightscout.androidaps.plugins.source.GlimpPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentService;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin; |
<<<<<<<
=======
import info.nightscout.androidaps.data.Profile;
>>>>>>>
import info.nightscout.androidaps.data.Profile;
<<<<<<<
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin;
import info.nightscout.androidaps.plugins.general.automation.AutomationPlugin;
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.general.tidepool.TidepoolPlugin;
import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader;
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin;
=======
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin;
import info.nightscout.androidaps.plugins.general.automation.AutomationPlugin;
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.general.tidepool.TidepoolPlugin;
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin;
>>>>>>>
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin;
import info.nightscout.androidaps.plugins.general.automation.AutomationPlugin;
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.general.tidepool.TidepoolPlugin;
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin;
<<<<<<<
import info.nightscout.androidaps.utils.protection.ProtectionCheck;
=======
import info.nightscout.androidaps.utils.SafeParse;
>>>>>>>
import info.nightscout.androidaps.utils.protection.ProtectionCheck;
import info.nightscout.androidaps.utils.SafeParse;
<<<<<<<
} else if (pref.getKey().contains(SP.getString(R.string.key_smscommunicator_allowednumbers, "")) && (editTextPref.getText() == null || TextUtils.isEmpty(editTextPref.getText().trim()))) {
pref.setSummary(MainApp.gs(R.string.smscommunicator_allowednumbers_summary));
=======
} else {
for (PluginBase plugin : MainApp.getPluginsList()) {
plugin.updatePreferenceSummary(pref);
}
>>>>>>>
} else {
for (PluginBase plugin : MainApp.getPluginsList()) {
plugin.updatePreferenceSummary(pref);
} |
<<<<<<<
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus;
=======
import info.nightscout.androidaps.plugins.pump.common.utils.LocationHelper;
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin;
>>>>>>>
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin;
<<<<<<<
@Inject BlePreCheck blePrecheck;
=======
@Inject RileyLinkUtil rileyLinkUtil;
// TODO change this. Currently verifyConfiguration uses MDT data not only RL
@Inject MedtronicPumpPlugin medtronicPumpPlugin;
private static final int PERMISSION_REQUEST_COARSE_LOCATION = 30241; // arbitrary.
private static final int REQUEST_ENABLE_BT = 30242; // arbitrary
>>>>>>>
@Inject BlePreCheck blePrecheck;
@Inject RileyLinkUtil rileyLinkUtil;
// TODO change this. Currently verifyConfiguration uses MDT data not only RL
@Inject MedtronicPumpPlugin medtronicPumpPlugin;
private static final int PERMISSION_REQUEST_COARSE_LOCATION = 30241; // arbitrary.
private static final int REQUEST_ENABLE_BT = 30242; // arbitrary |
<<<<<<<
final boolean predictionsAvailable = finalLastRun != null && finalLastRun.request.hasPredictions;
if (predictionsAvailable) {
showPredictionView.setVisibility(View.VISIBLE);
getActivity().findViewById(R.id.overview_showprediction_label).setVisibility(View.VISIBLE);
=======
final boolean showPrediction = showPredictionCheckbox.isChecked() && finalLastRun != null && finalLastRun.constraintsProcessed.getClass().equals(DetermineBasalResultAMA.class);
if (MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class) != null && MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class).isEnabled(PluginBase.APS)) {
showPredictionCheckbox.setVisibility(View.VISIBLE);
showPredictionLabel.setVisibility(View.VISIBLE);
>>>>>>>
final boolean predictionsAvailable = finalLastRun != null && finalLastRun.request.hasPredictions;
if (predictionsAvailable) {
showPredictionCheckbox.setVisibility(View.VISIBLE);
showPredictionLabel.setVisibility(View.VISIBLE);
<<<<<<<
if (showIobView.isChecked() || showCobView.isChecked() || showDeviationsView.isChecked() || showRatiosView.isChecked() || Config.displayDeviationSlope) {
=======
if (showIobCheckbox.isChecked() || showCobCheckbox.isChecked() || showDeviationsCheckbox.isChecked() || showRatiosCheckbox.isChecked()) {
>>>>>>>
if (showIobCheckbox.isChecked() || showCobCheckbox.isChecked() || showDeviationsCheckbox.isChecked() || showRatiosCheckbox.isChecked() || Config.displayDeviationSlope) { |
<<<<<<<
public static final int WRONGBASALSTEP = 23;
=======
public static final int BOLUS_DELIVERY_ERROR = 24;
>>>>>>>
public static final int WRONGBASALSTEP = 23;
public static final int BOLUS_DELIVERY_ERROR = 24; |
<<<<<<<
import info.nightscout.androidaps.plugins.IobCobCalculator.events.BasalData;
import info.nightscout.androidaps.plugins.Loop.APSResult;
=======
import info.nightscout.androidaps.plugins.IobCobCalculator.BasalData;
import info.nightscout.androidaps.plugins.OpenAPSAMA.DetermineBasalResultAMA;
>>>>>>>
import info.nightscout.androidaps.plugins.IobCobCalculator.BasalData;
import info.nightscout.androidaps.plugins.Loop.APSResult;
<<<<<<<
public void addBgReadings(GraphView bgGraph, long fromTime, long toTime, double lowLine, double highLine, APSResult apsResult) {
=======
public GraphData(GraphView graph) {
units = MainApp.getConfigBuilder().getProfileUnits();
this.graph = graph;
}
public void addBgReadings(long fromTime, long toTime, double lowLine, double highLine, DetermineBasalResultAMA amaResult) {
>>>>>>>
public GraphData(GraphView graph) {
units = MainApp.getConfigBuilder().getProfileUnits();
this.graph = graph;
}
public void addBgReadings(long fromTime, long toTime, double lowLine, double highLine, APSResult apsResult) {
<<<<<<<
public void addRatio(GraphView graph, long fromTime, long toTime, boolean useForScale, double scale) {
LineGraphSeries<ScaledDataPoint> ratioSeries;
List<ScaledDataPoint> ratioArray = new ArrayList<>();
=======
public void addRatio(long fromTime, long toTime, boolean useForScale, double scale) {
LineGraphSeries<DataPoint> ratioSeries;
List<DataPoint> ratioArray = new ArrayList<>();
>>>>>>>
public void addRatio(long fromTime, long toTime, boolean useForScale, double scale) {
LineGraphSeries<ScaledDataPoint> ratioSeries;
List<ScaledDataPoint> ratioArray = new ArrayList<>();
<<<<<<<
public void addDeviationSlope(GraphView graph, long fromTime, long toTime, boolean useForScale, double scale) {
LineGraphSeries<ScaledDataPoint> dsMaxSeries;
LineGraphSeries<ScaledDataPoint> dsMinSeries;
List<ScaledDataPoint> dsMaxArray = new ArrayList<>();
List<ScaledDataPoint> dsMinArray = new ArrayList<>();
Double maxFromMaxValueFound = 0d;
Double maxFromMinValueFound = 0d;
Scale dsMaxScale = new Scale();
Scale dsMinScale = new Scale();
for (long time = fromTime; time <= toTime; time += 5 * 60 * 1000L) {
AutosensData autosensData = IobCobCalculatorPlugin.getAutosensData(time);
if (autosensData != null) {
dsMaxArray.add(new ScaledDataPoint(time, autosensData.slopeFromMaxDeviation, dsMaxScale));
dsMinArray.add(new ScaledDataPoint(time, autosensData.slopeFromMinDeviation, dsMinScale));
maxFromMaxValueFound = Math.max(maxFromMaxValueFound, Math.abs(autosensData.slopeFromMaxDeviation));
maxFromMinValueFound = Math.max(maxFromMinValueFound, Math.abs(autosensData.slopeFromMinDeviation));
}
}
// Slopes
ScaledDataPoint[] ratioMaxData = new ScaledDataPoint[dsMaxArray.size()];
ratioMaxData = dsMaxArray.toArray(ratioMaxData);
dsMaxSeries = new LineGraphSeries<>(ratioMaxData);
dsMaxSeries.setColor(Color.MAGENTA);
dsMaxSeries.setThickness(3);
ScaledDataPoint[] ratioMinData = new ScaledDataPoint[dsMinArray.size()];
ratioMinData = dsMinArray.toArray(ratioMinData);
dsMinSeries = new LineGraphSeries<>(ratioMinData);
dsMinSeries.setColor(Color.YELLOW);
dsMinSeries.setThickness(3);
if (useForScale)
maxY = Math.max(maxFromMaxValueFound, maxFromMinValueFound);
dsMaxScale.setMultiplier(maxY * scale / maxFromMaxValueFound);
dsMinScale.setMultiplier(maxY * scale / maxFromMinValueFound);
addSeriesWithoutInvalidate(graph, dsMaxSeries);
addSeriesWithoutInvalidate(graph, dsMinSeries);
}
// scale in % of vertical size (like 0.3)
public void addNowLine(GraphView graph, long now) {
=======
public void addNowLine(long now) {
>>>>>>>
public void addDeviationSlope(long fromTime, long toTime, boolean useForScale, double scale) {
LineGraphSeries<ScaledDataPoint> dsMaxSeries;
LineGraphSeries<ScaledDataPoint> dsMinSeries;
List<ScaledDataPoint> dsMaxArray = new ArrayList<>();
List<ScaledDataPoint> dsMinArray = new ArrayList<>();
Double maxFromMaxValueFound = 0d;
Double maxFromMinValueFound = 0d;
Scale dsMaxScale = new Scale();
Scale dsMinScale = new Scale();
for (long time = fromTime; time <= toTime; time += 5 * 60 * 1000L) {
AutosensData autosensData = IobCobCalculatorPlugin.getAutosensData(time);
if (autosensData != null) {
dsMaxArray.add(new ScaledDataPoint(time, autosensData.slopeFromMaxDeviation, dsMaxScale));
dsMinArray.add(new ScaledDataPoint(time, autosensData.slopeFromMinDeviation, dsMinScale));
maxFromMaxValueFound = Math.max(maxFromMaxValueFound, Math.abs(autosensData.slopeFromMaxDeviation));
maxFromMinValueFound = Math.max(maxFromMinValueFound, Math.abs(autosensData.slopeFromMinDeviation));
}
}
// Slopes
ScaledDataPoint[] ratioMaxData = new ScaledDataPoint[dsMaxArray.size()];
ratioMaxData = dsMaxArray.toArray(ratioMaxData);
dsMaxSeries = new LineGraphSeries<>(ratioMaxData);
dsMaxSeries.setColor(Color.MAGENTA);
dsMaxSeries.setThickness(3);
ScaledDataPoint[] ratioMinData = new ScaledDataPoint[dsMinArray.size()];
ratioMinData = dsMinArray.toArray(ratioMinData);
dsMinSeries = new LineGraphSeries<>(ratioMinData);
dsMinSeries.setColor(Color.YELLOW);
dsMinSeries.setThickness(3);
if (useForScale)
maxY = Math.max(maxFromMaxValueFound, maxFromMinValueFound);
dsMaxScale.setMultiplier(maxY * scale / maxFromMaxValueFound);
dsMinScale.setMultiplier(maxY * scale / maxFromMinValueFound);
addSeries(dsMaxSeries);
addSeries(dsMinSeries);
}
// scale in % of vertical size (like 0.3)
public void addNowLine(long now) { |
<<<<<<<
import info.nightscout.androidaps.utils.buildHelper.BuildHelper;
import info.nightscout.androidaps.utils.resources.ResourceHelper;
import info.nightscout.androidaps.utils.sharedPreferences.SP;
import info.nightscout.androidaps.utils.wizard.BolusWizard;
import info.nightscout.androidaps.utils.wizard.QuickWizard;
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry;
=======
import info.nightscout.androidaps.utils.protection.ProtectionCheck;
>>>>>>>
import info.nightscout.androidaps.utils.buildHelper.BuildHelper;
import info.nightscout.androidaps.utils.resources.ResourceHelper;
import info.nightscout.androidaps.utils.sharedPreferences.SP;
import info.nightscout.androidaps.utils.wizard.BolusWizard;
import info.nightscout.androidaps.utils.wizard.QuickWizard;
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry;
import info.nightscout.androidaps.utils.protection.ProtectionCheck;
<<<<<<<
new TreatmentDialog().show(manager, "Overview");
=======
ProtectionCheck.INSTANCE.queryProtection(getActivity(), ProtectionCheck.Protection.BOLUS, () -> new NewTreatmentDialog().show(manager, "TreatmentDialog"));
>>>>>>>
ProtectionCheck.INSTANCE.queryProtection(getActivity(), ProtectionCheck.Protection.BOLUS, () -> new TreatmentDialog().show(manager, "Overview"));
<<<<<<<
new InsulinDialog().show(manager, "Overview");
=======
ProtectionCheck.INSTANCE.queryProtection(getActivity(), ProtectionCheck.Protection.BOLUS, () -> new NewInsulinDialog().show(manager, "InsulinDialog"));
>>>>>>>
ProtectionCheck.INSTANCE.queryProtection(getActivity(), ProtectionCheck.Protection.BOLUS, () -> new InsulinDialog().show(manager, "Overview"));
<<<<<<<
new CarbsDialog().show(manager, "Overview");
=======
ProtectionCheck.INSTANCE.queryProtection(getActivity(), ProtectionCheck.Protection.BOLUS, () -> new NewCarbsDialog().show(manager, "CarbsDialog"));
>>>>>>>
ProtectionCheck.INSTANCE.queryProtection(getActivity(), ProtectionCheck.Protection.BOLUS, () -> new CarbsDialog().show(manager, "Overview")); |
<<<<<<<
import static org.hyperic.plugin.vrealize.automation.VRAUtils.getFqdn;
=======
>>>>>>>
import static org.hyperic.plugin.vrealize.automation.VRAUtils.getFqdn;
<<<<<<<
String databaseServerFqdn = getFqdn(jdbcURL);
=======
String databaseServerFqdn = getDatabaseFqdn(jdbcURL);
>>>>>>>
String databaseServerFqdn = getDatabaseFqdn(jdbcURL);
<<<<<<<
/* inline unit test */
// @Test
// public void test() {
// ServerResource server = new ServerResource();
// server.setName("THE_SERVER");
// server.setType("THE_SERVER_TYPE");
// Collection<String> loadBalancerFqdns = new ArrayList<String>();
// loadBalancerFqdns.add("vco.lb.com");
//
// Resource modelResource = getCommonModel(server.getName(), server.getType(), loadBalancerFqdns, "shmulik.database.com");
// String modelXml = marshallResource(modelResource);
// Assert.assertNotNull(modelXml);
//
// System.out.println(modelXml);
// }
=======
private String getDatabaseFqdn(String jdbcConnectionString){
String fqdn = "127.0.0.1";
// jdbcURL='jdbc:jtds:sqlserver://mssql-a2-bg-01.refarch.eng.vmware.com:1433/vCO;domain=refarch.eng.vmware.com;useNTLMv2=true'
if (!StringUtils.isEmpty(jdbcConnectionString)){
int beginIndex = jdbcConnectionString.indexOf("//") + "//".length();
int endIndex = jdbcConnectionString.indexOf(':', beginIndex);
fqdn = jdbcConnectionString.substring(beginIndex, endIndex);
}
return fqdn;
}
/* inline unit test
@Test
public void test() {
ServerResource server = new ServerResource();
server.setName("THE_SERVER");
server.setType("THE_SERVER_TYPE");
Collection<String> loadBalancerFqdns = new ArrayList<String>();
loadBalancerFqdns.add("vco.lb.com");
String jdbcUrl = getDatabaseFqdn("jdbc:jtds:sqlserver://mssql-a2-bg-01.refarch.eng.vmware.com:1433/vCO;domain=refarch.eng.vmware.com;useNTLMv2=true");
Resource modelResource = getCommonModel(server.getName(), server.getType(), loadBalancerFqdns, jdbcUrl);
String modelXml = marshallResource(modelResource);
Assert.assertNotNull(modelXml);
System.out.println(modelXml);
}
*/
>>>>>>>
/* inline unit test */
// @Test
// public void test() {
// ServerResource server = new ServerResource();
// server.setName("THE_SERVER");
// server.setType("THE_SERVER_TYPE");
// Collection<String> loadBalancerFqdns = new ArrayList<String>();
// loadBalancerFqdns.add("vco.lb.com");
//
// Resource modelResource = getCommonModel(server.getName(), server.getType(), loadBalancerFqdns, "shmulik.database.com");
// String modelXml = marshallResource(modelResource);
// Assert.assertNotNull(modelXml);
//
// System.out.println(modelXml);
// }
private String getDatabaseFqdn(String jdbcConnectionString) {
String fqdn = "127.0.0.1";
// jdbcURL='jdbc:jtds:sqlserver://mssql-a2-bg-01.refarch.eng.vmware.com:1433/vCO;domain=refarch.eng.vmware.com;useNTLMv2=true'
if (!StringUtils.isEmpty(jdbcConnectionString)){
int beginIndex = jdbcConnectionString.indexOf("//") + "//".length();
int endIndex = jdbcConnectionString.indexOf(':', beginIndex);
fqdn = jdbcConnectionString.substring(beginIndex, endIndex);
}
return fqdn;
}
/* inline unit test
@Test
public void test() {
ServerResource server = new ServerResource();
server.setName("THE_SERVER");
server.setType("THE_SERVER_TYPE");
Collection<String> loadBalancerFqdns = new ArrayList<String>();
loadBalancerFqdns.add("vco.lb.com");
String jdbcUrl = getDatabaseFqdn("jdbc:jtds:sqlserver://mssql-a2-bg-01.refarch.eng.vmware.com:1433/vCO;domain=refarch.eng.vmware.com;useNTLMv2=true");
Resource modelResource = getCommonModel(server.getName(), server.getType(), loadBalancerFqdns, jdbcUrl);
String modelXml = marshallResource(modelResource);
Assert.assertNotNull(modelXml);
System.out.println(modelXml);
}
*/ |
<<<<<<<
returnData = communicationManager.initPod((PodInitActionType) parameters[0], (PodInitReceiver) parameters[1]);
=======
returnData = communicationManager.pairAndPrime();
>>>>>>>
returnData = communicationManager.initPod();
// TODO returnData = communicationManager.pairAndPrime();
<<<<<<<
public boolean wasCommandSuccessful() {
if (returnData == null) {
return false;
}
return returnData.success;
}
=======
>>>>>>>
public boolean wasCommandSuccessful() {
if (returnData == null) {
return false;
}
return returnData.success;
} |
<<<<<<<
Iob aIOB = insulinInterface.iobCalcForTreatment(tempBolusPart, time, profile.getDia());
result.basaliob += aIOB.iobContrib;
result.activity += aIOB.activityContrib;
Double dia_ago = time - profile.getDia() * 60 * 60 * 1000;
if (date > dia_ago && date <= time) {
=======
Iob aIOB = insulinInterface.iobCalc(tempBolusPart, time, profile.getDia());
result.basaliob += aIOB.iobContrib;
result.activity += aIOB.activityContrib;
>>>>>>>
Iob aIOB = insulinInterface.iobCalcForTreatment(tempBolusPart, time, profile.getDia());
result.basaliob += aIOB.iobContrib;
result.activity += aIOB.activityContrib; |
<<<<<<<
=======
@Override
public double getReservoirLevel() { return reservoirInUnits; }
@Override
public int getBatteryLevel() { return batteryPercent; }
>>>>>>>
@Override
public double getReservoirLevel() { return reservoirInUnits; }
@Override
public int getBatteryLevel() { return batteryPercent; } |
<<<<<<<
import info.nightscout.androidaps.plugins.Actions.ActionsFragment;
import info.nightscout.androidaps.plugins.Careportal.CareportalPlugin;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.ConstraintsObjectives.ObjectivesPlugin;
import info.nightscout.androidaps.plugins.ConstraintsSafety.SafetyPlugin;
import info.nightscout.androidaps.plugins.Food.FoodPlugin;
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefFreePeakPlugin;
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefRapidActingPlugin;
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefUltraRapidActingPlugin;
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
import info.nightscout.androidaps.plugins.Maintenance.LoggerUtils;
import info.nightscout.androidaps.plugins.Maintenance.MaintenancePlugin;
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
import info.nightscout.androidaps.plugins.NSClientInternal.NSClientPlugin;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.androidaps.plugins.NSClientInternal.receivers.AckAlarmReceiver;
import info.nightscout.androidaps.plugins.NSClientInternal.receivers.DBAccessReceiver;
import info.nightscout.androidaps.plugins.OpenAPSAMA.OpenAPSAMAPlugin;
import info.nightscout.androidaps.plugins.OpenAPSMA.OpenAPSMAPlugin;
import info.nightscout.androidaps.plugins.OpenAPSSMB.OpenAPSSMBPlugin;
import info.nightscout.androidaps.plugins.Overview.OverviewPlugin;
import info.nightscout.androidaps.plugins.Persistentnotification.PersistentNotificationPlugin;
import info.nightscout.androidaps.plugins.ProfileLocal.LocalProfilePlugin;
import info.nightscout.androidaps.plugins.ProfileNS.NSProfilePlugin;
import info.nightscout.androidaps.plugins.ProfileSimple.SimpleProfilePlugin;
import info.nightscout.androidaps.plugins.PumpCombo.ComboPlugin;
import info.nightscout.androidaps.plugins.PumpCommon.hw.rileylink.RileyLinkConst;
import info.nightscout.androidaps.plugins.PumpCommon.hw.rileylink.RileyLinkUtil;
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPlugin;
import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanPlugin;
import info.nightscout.androidaps.plugins.PumpDanaRS.DanaRSPlugin;
import info.nightscout.androidaps.plugins.PumpDanaRv2.DanaRv2Plugin;
import info.nightscout.androidaps.plugins.PumpInsight.InsightPlugin;
import info.nightscout.androidaps.plugins.PumpInsightLocal.LocalInsightPlugin;
import info.nightscout.androidaps.plugins.PumpMDI.MDIPlugin;
import info.nightscout.androidaps.plugins.PumpMedtronic.MedtronicPumpPlugin;
import info.nightscout.androidaps.plugins.PumpMedtronic.util.MedtronicConst;
import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpPlugin;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityAAPSPlugin;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityOref0Plugin;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityOref1Plugin;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityWeightedAveragePlugin;
import info.nightscout.androidaps.plugins.SmsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.Source.SourceDexcomG5Plugin;
import info.nightscout.androidaps.plugins.Source.SourceDexcomG6Plugin;
import info.nightscout.androidaps.plugins.Source.SourceEversensePlugin;
import info.nightscout.androidaps.plugins.Source.SourceGlimpPlugin;
import info.nightscout.androidaps.plugins.Source.SourceMM640gPlugin;
import info.nightscout.androidaps.plugins.Source.SourceNSClientPlugin;
import info.nightscout.androidaps.plugins.Source.SourcePoctechPlugin;
import info.nightscout.androidaps.plugins.Source.SourceXdripPlugin;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.androidaps.plugins.Wear.WearPlugin;
import info.nightscout.androidaps.plugins.XDripStatusline.StatuslinePlugin;
=======
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSMA.OpenAPSMAPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.constraints.dstHelper.DstHelperPlugin;
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin;
import info.nightscout.androidaps.plugins.general.actions.ActionsFragment;
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin;
import info.nightscout.androidaps.plugins.general.food.FoodPlugin;
import info.nightscout.androidaps.plugins.general.maintenance.LoggerUtils;
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.nsclient.receivers.AckAlarmReceiver;
import info.nightscout.androidaps.plugins.general.nsclient.receivers.DBAccessReceiver;
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
import info.nightscout.androidaps.plugins.general.persistentNotification.PersistentNotificationPlugin;
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin;
import info.nightscout.androidaps.plugins.profile.ns.NSProfilePlugin;
import info.nightscout.androidaps.plugins.profile.simple.SimpleProfilePlugin;
import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin;
import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin;
import info.nightscout.androidaps.plugins.pump.danaRv2.DanaRv2Plugin;
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin;
import info.nightscout.androidaps.plugins.pump.mdi.MDIPlugin;
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref0Plugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
import info.nightscout.androidaps.plugins.source.SourceDexcomG5Plugin;
import info.nightscout.androidaps.plugins.source.SourceDexcomG6Plugin;
import info.nightscout.androidaps.plugins.source.SourceEversensePlugin;
import info.nightscout.androidaps.plugins.source.SourceGlimpPlugin;
import info.nightscout.androidaps.plugins.source.SourceMM640gPlugin;
import info.nightscout.androidaps.plugins.source.SourceNSClientPlugin;
import info.nightscout.androidaps.plugins.source.SourcePoctechPlugin;
import info.nightscout.androidaps.plugins.source.SourceTomatoPlugin;
import info.nightscout.androidaps.plugins.source.SourceXdripPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
>>>>>>>
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSMA.OpenAPSMAPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.constraints.dstHelper.DstHelperPlugin;
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin;
import info.nightscout.androidaps.plugins.general.actions.ActionsFragment;
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin;
import info.nightscout.androidaps.plugins.general.food.FoodPlugin;
import info.nightscout.androidaps.plugins.general.maintenance.LoggerUtils;
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.nsclient.receivers.AckAlarmReceiver;
import info.nightscout.androidaps.plugins.general.nsclient.receivers.DBAccessReceiver;
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
import info.nightscout.androidaps.plugins.general.persistentNotification.PersistentNotificationPlugin;
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin;
import info.nightscout.androidaps.plugins.profile.ns.NSProfilePlugin;
import info.nightscout.androidaps.plugins.profile.simple.SimpleProfilePlugin;
import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin;
import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin;
import info.nightscout.androidaps.plugins.pump.danaRv2.DanaRv2Plugin;
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin;
import info.nightscout.androidaps.plugins.pump.mdi.MDIPlugin;
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref0Plugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
import info.nightscout.androidaps.plugins.source.SourceDexcomG5Plugin;
import info.nightscout.androidaps.plugins.source.SourceDexcomG6Plugin;
import info.nightscout.androidaps.plugins.source.SourceEversensePlugin;
import info.nightscout.androidaps.plugins.source.SourceGlimpPlugin;
import info.nightscout.androidaps.plugins.source.SourceMM640gPlugin;
import info.nightscout.androidaps.plugins.source.SourceNSClientPlugin;
import info.nightscout.androidaps.plugins.source.SourcePoctechPlugin;
import info.nightscout.androidaps.plugins.source.SourceTomatoPlugin;
import info.nightscout.androidaps.plugins.source.SourceXdripPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
<<<<<<<
import info.nightscout.utils.FabricPrivacy;
import info.nightscout.androidaps.plugins.Maintenance.LoggerUtils;
import info.nightscout.utils.SP;
=======
import info.nightscout.androidaps.utils.FabricPrivacy;
>>>>>>>
import info.nightscout.androidaps.utils.FabricPrivacy;
<<<<<<<
if (Config.PUMPDRIVERS && engineeringMode) {
pluginsList.add(MedtronicPumpPlugin.getPlugin());
}
if (Config.PUMPDRIVERS)
pluginsList.add(ComboPlugin.getPlugin());
if (Config.MDI)
pluginsList.add(MDIPlugin.getPlugin());
=======
if (Config.PUMPDRIVERS) pluginsList.add(ComboPlugin.getPlugin());
if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin());
>>>>>>>
if (Config.PUMPDRIVERS) pluginsList.add(ComboPlugin.getPlugin());
if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin());
if (Config.PUMPDRIVERS && engineeringMode) {
pluginsList.add(MedtronicPumpPlugin.getPlugin());
}
<<<<<<<
=======
public static int getIcon() {
if (Config.NSCLIENT)
return R.mipmap.ic_yellowowl;
else if (Config.PUMPCONTROL)
return R.mipmap.ic_pumpcontrol;
else
return R.mipmap.ic_launcher;
}
public static int getNotificationIcon() {
if (Config.NSCLIENT)
return R.drawable.ic_notif_nsclient;
else if (Config.PUMPCONTROL)
return R.drawable.ic_notif_pumpcontrol;
else
return R.drawable.ic_notif_aaps;
}
>>>>>>>
public static int getIcon() {
if (Config.NSCLIENT)
return R.mipmap.ic_yellowowl;
else if (Config.PUMPCONTROL)
return R.mipmap.ic_pumpcontrol;
else
return R.mipmap.ic_launcher;
}
public static int getNotificationIcon() {
if (Config.NSCLIENT)
return R.drawable.ic_notif_nsclient;
else if (Config.PUMPCONTROL)
return R.drawable.ic_notif_pumpcontrol;
else
return R.drawable.ic_notif_aaps;
} |
<<<<<<<
@Inject AAPSLogger aapsLogger;
@Inject Context context;
@Inject MedtronicPumpPlugin medtronicPumpPlugin;
@Inject SP sp;
=======
//@Inject AAPSLogger aapsLogger;
//@Inject Context context;
@Inject MedtronicPumpPlugin medtronicPumpPlugin;
//@Inject SP sp;
>>>>>>>
//@Inject AAPSLogger aapsLogger;
//@Inject Context context;
@Inject MedtronicPumpPlugin medtronicPumpPlugin;
//@Inject SP sp;
<<<<<<<
aapsLogger.debug(LTag.PUMPCOMM, "RileyLinkMedtronicService newly constructed");
MedtronicUtil.setMedtronicService(this);
pumpStatus = (MedtronicPumpStatus) medtronicPumpPlugin.getPumpStatusData();
=======
>>>>>>>
<<<<<<<
medtronicCommunicationManager = new MedtronicCommunicationManager(rfspy);
=======
medtronicCommunicationManager = new MedtronicCommunicationManager(context, rfspy);
aapsLogger.debug(LTag.PUMPCOMM, "RileyLinkMedtronicService newly constructed");
MedtronicUtil.setMedtronicService(this);
pumpStatus = (MedtronicPumpStatus) medtronicPumpPlugin.getPumpStatusData();
>>>>>>>
medtronicCommunicationManager = new MedtronicCommunicationManager(rfspy);
aapsLogger.debug(LTag.PUMPCOMM, "RileyLinkMedtronicService newly constructed");
MedtronicUtil.setMedtronicService(this);
pumpStatus = (MedtronicPumpStatus) medtronicPumpPlugin.getPumpStatusData(); |
<<<<<<<
if (!sp.getBoolean(R.string.key_setupwizard_processed, false)) {
=======
if (!SP.getBoolean(R.string.key_setupwizard_processed, false) && !isRunningRealPumpTest()) {
>>>>>>>
if (!sp.getBoolean(R.string.key_setupwizard_processed, false) && !isRunningRealPumpTest()) { |
<<<<<<<
import info.nightscout.androidaps.plugins.PumpCombo.ComboPlugin;
=======
import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefFreePeakPlugin;
>>>>>>>
import info.nightscout.androidaps.plugins.PumpCombo.ComboPlugin;
import info.nightscout.androidaps.plugins.InsulinOrefCurves.InsulinOrefFreePeakPlugin; |
<<<<<<<
import android.widget.LinearLayout;
=======
import android.widget.EditText;
>>>>>>>
import android.widget.EditText;
import android.widget.LinearLayout;
<<<<<<<
if (carbsAfterConstraints > 0) {
if (duration == 0) {
createCarb(carbsAfterConstraints, time);
} else {
long remainingCarbs = carbsAfterConstraints;
long carbTime = time;
long smallCarbAmount = Math.round(remainingCarbs / (editDuration.getValue() * 4));
if (smallCarbAmount == 0) smallCarbAmount = 1;
while (remainingCarbs > 0) {
createCarb(Math.min(smallCarbAmount, remainingCarbs), carbTime);
remainingCarbs -= smallCarbAmount;
carbTime += 15 * 60 * 1000;
=======
if (finalCarbsAfterConstraints > 0) {
DetailedBolusInfo detailedBolusInfo = new DetailedBolusInfo();
detailedBolusInfo.date = eventTime.getTime();
detailedBolusInfo.eventType = CareportalEvent.CARBCORRECTION;
detailedBolusInfo.carbs = finalCarbsAfterConstraints;
detailedBolusInfo.context = context;
detailedBolusInfo.source = Source.USER;
detailedBolusInfo.notes = finalNotes;
if (ConfigBuilderPlugin.getActivePump().getPumpDescription().storesCarbInfo) {
ConfigBuilderPlugin.getCommandQueue().bolus(detailedBolusInfo, new Callback() {
@Override
public void run() {
if (!result.success) {
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
i.putExtra("soundid", R.raw.boluserror);
i.putExtra("status", result.comment);
i.putExtra("title", MainApp.gs(R.string.treatmentdeliveryerror));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
}
>>>>>>>
if (carbsAfterConstraints > 0) {
if (duration == 0) {
createCarb(carbsAfterConstraints, time, finalNotes);
} else {
long remainingCarbs = carbsAfterConstraints;
long carbTime = time;
long smallCarbAmount = Math.round(remainingCarbs / (editDuration.getValue() * 4));
if (smallCarbAmount == 0) smallCarbAmount = 1;
while (remainingCarbs > 0) {
createCarb(Math.min(smallCarbAmount, remainingCarbs), carbTime, finalNotes);
remainingCarbs -= smallCarbAmount;
carbTime += 15 * 60 * 1000; |
<<<<<<<
package io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.impl.dao;
import io.oasp.gastronomy.restaurant.general.common.AbstractSpringIntegrationTest;
import io.oasp.gastronomy.restaurant.general.common.api.datatype.Money;
import io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.api.BillEntity;
import io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.api.dao.BillDao;
import io.oasp.module.configuration.common.api.ApplicationConfigurationConstants;
import java.util.List;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import javax.transaction.Transactional;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
*
* @author mvielsac
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({ ApplicationConfigurationConstants.BEANS_DATA_ACCESS })
@Transactional
public class BillDaoTest extends AbstractSpringIntegrationTest {
@Inject
private BillDao billDao;
@PersistenceContext
private EntityManager entityManager;
/**
* Tests if a Bill is persisted correctly. Special focus is on the mapping of {@link Money} and furthermore the query
* of one of the {@link Money} fields is tested.
*/
@Test
public void testPersist() {
BillEntity bill = new BillEntity();
bill.setTotal(new Money(42.42));
bill.setTip(new Money(1.0));
bill.setPayed(true);
assertNull(bill.getId());
this.billDao.save(bill);
assertNotNull(bill.getId());
BillEntity loadedBill = this.billDao.findOne(bill.getId());
assertEquals(bill, loadedBill);
TypedQuery<BillEntity> query =
this.entityManager.createQuery("SELECT b from Bill b where b.total > 43", BillEntity.class);
List<BillEntity> resultList = query.getResultList();
assertTrue(resultList.isEmpty());
query = this.entityManager.createQuery("SELECT b from Bill b where b.total < 43", BillEntity.class);
resultList = query.getResultList();
assertTrue(!resultList.isEmpty());
}
}
=======
package io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.impl.dao;
import io.oasp.gastronomy.restaurant.general.common.AbstractSpringIntegrationTest;
import io.oasp.gastronomy.restaurant.general.common.api.datatype.Money;
import io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.api.BillEntity;
import io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.api.dao.BillDao;
import io.oasp.module.configuration.common.api.ApplicationConfigurationConstants;
import java.util.List;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
/**
*
* @author mvielsac
*/
@ContextConfiguration({ ApplicationConfigurationConstants.BEANS_DATA_ACCESS })
public class BillDaoTest extends AbstractSpringIntegrationTest {
@Inject
private BillDao billDao;
@PersistenceContext
private EntityManager entityManager;
/**
* Tests if a Bill is persisted correctly. Special focus is on the mapping of {@link Money} and furthermore the query
* of one of the {@link Money} fields is tested.
*/
@Test
public void testPersist() {
BillEntity bill = new BillEntity();
bill.setTotal(new Money(42.42));
bill.setTip(new Money(1.0));
bill.setPayed(true);
assertThat(bill.getId()).isNull();
this.billDao.save(bill);
assertThat(bill.getId()).isNotNull();
BillEntity loadedBill = this.billDao.findOne(bill.getId());
assertThat(bill).isEqualTo(loadedBill);
TypedQuery<BillEntity> query =
this.entityManager.createQuery("SELECT b from Bill b where b.total > 43", BillEntity.class);
List<BillEntity> resultList = query.getResultList();
assertThat(resultList.isEmpty()).isTrue();
query = this.entityManager.createQuery("SELECT b from Bill b where b.total < 43", BillEntity.class);
resultList = query.getResultList();
assertThat(!resultList.isEmpty()).isTrue();
}
}
>>>>>>>
package io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.impl.dao;
import io.oasp.gastronomy.restaurant.general.common.AbstractSpringIntegrationTest;
import io.oasp.gastronomy.restaurant.general.common.api.datatype.Money;
import io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.api.BillEntity;
import io.oasp.gastronomy.restaurant.salesmanagement.dataaccess.api.dao.BillDao;
import io.oasp.module.configuration.common.api.ApplicationConfigurationConstants;
import java.util.List;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import javax.transaction.Transactional;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
/**
*
* @author mvielsac
*/
@ContextConfiguration({ ApplicationConfigurationConstants.BEANS_DATA_ACCESS })
public class BillDaoTest extends AbstractSpringIntegrationTest {
@Inject
private BillDao billDao;
@PersistenceContext
private EntityManager entityManager;
/**
* Tests if a Bill is persisted correctly. Special focus is on the mapping of {@link Money} and furthermore the query
* of one of the {@link Money} fields is tested.
*/
@Test
public void testPersist() {
BillEntity bill = new BillEntity();
bill.setTotal(new Money(42.42));
bill.setTip(new Money(1.0));
bill.setPayed(true);
assertThat(bill.getId()).isNull();
this.billDao.save(bill);
assertThat(bill.getId()).isNotNull();
BillEntity loadedBill = this.billDao.findOne(bill.getId());
assertThat(bill).isEqualTo(loadedBill);
TypedQuery<BillEntity> query =
this.entityManager.createQuery("SELECT b from Bill b where b.total > 43", BillEntity.class);
List<BillEntity> resultList = query.getResultList();
assertThat(resultList.isEmpty()).isTrue();
query = this.entityManager.createQuery("SELECT b from Bill b where b.total < 43", BillEntity.class);
resultList = query.getResultList();
assertThat(!resultList.isEmpty()).isTrue();
}
} |
<<<<<<<
public void setMessage(String message, final int messageKind) {
=======
public void setMessage(final String message, final int messageKind) {
>>>>>>>
public void setMessage(String message, final int messageKind) {
<<<<<<<
=======
public void removeMessages(final int messageKind) {
if (messageKind == IStatus.INFO) {
messages.remove(IStatus.INFO);
} else if (messageKind == IStatus.ERROR) {
messages.remove(IStatus.ERROR);
} else if (messageKind == IStatus.WARNING) {
messages.remove(IStatus.WARNING);
}
refresh();
}
protected void fireValidationStatusChanged(final int newStatus) {
for (final IExpressionValidationListener listener : validationListeners) {
listener.validationStatusChanged(newStatus);
}
}
>>>>>>>
public void removeMessages(final int messageKind) {
if (messageKind == IStatus.INFO) {
messages.remove(IStatus.INFO);
} else if (messageKind == IStatus.ERROR) {
messages.remove(IStatus.ERROR);
} else if (messageKind == IStatus.WARNING) {
messages.remove(IStatus.WARNING);
}
refresh();
} |
<<<<<<<
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@Override
public boolean performFinish() {
try {
getContainer().run(false, false, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
String implId = NamingUtils.toConnectorImplementationFilename(implWorkingCopy.getImplementationId(),implWorkingCopy.getImplementationVersion(),false);
String implFileName = implId+"."+ConnectorImplRepositoryStore.CONNECTOR_IMPL_EXT;
if(editMode){
final String qualifiedClassname = implWorkingCopy.getImplementationClassname() ;
final IRepositoryFileStore file = sourceStore.getChild(ClassGenerator.getAbstractClassName(originalImpl.getImplementationClassname())) ;
if(file != null){
file.delete() ;
}
if(!originalImpl.getImplementationClassname().equals(implWorkingCopy.getImplementationClassname())){
SourceFileStore sourceFile = (SourceFileStore) sourceStore.getChild(originalImpl.getImplementationClassname()) ;
if(sourceFile != null){
sourceFile.rename(qualifiedClassname) ;
try {
ClassGenerator.updateConnectorImplementationAbstractClassName(implWorkingCopy, ClassGenerator.getAbstractClassName(originalImpl.getImplementationClassname()), sourceFile, monitor);
} catch (Exception e) {
BonitaStudioLog.error(e);
}
}
}
if(!fileStore.getName().equals(implFileName)){
fileStore.delete() ;
}
}
fileStore = implStore.createRepositoryFileStore(implFileName) ;
fileStore.save(implWorkingCopy) ;
try {
ConnectorDefinition definition = ((IDefinitionRepositoryStore) defStore).getDefinition(implWorkingCopy.getDefinitionId(),implWorkingCopy.getDefinitionVersion()) ;
ClassGenerator.generateConnectorImplementationAbstractClass(implWorkingCopy,definition,getAbstractClassName(),sourceStore, monitor) ;
fileToOpen = ClassGenerator.generateConnectorImplementationClass(implWorkingCopy,definition,sourceStore, monitor) ;
} catch (Exception e) {
BonitaStudioLog.error(e) ;
}
monitor.done() ;
}
});
} catch (Exception e){
BonitaStudioLog.error(e) ;
}
if(fileToOpen != null){
BusyIndicator.showWhile(Display.getDefault(),new Runnable() {
@Override
public void run() {
//need to get the acive page from the UI shell
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
IEditorPart part = IDE.openEditor(page, new FileEditorInput(fileToOpen), BonitaJavaEditor.ID);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveEditor(part, false);
} catch (PartInitException e) {
}
}
});
}
return true;
}
protected String getAbstractClassName() {
return AbstractConnector.class.getName();
}
public ConnectorImplementation getOriginalImplementation() {
return originalImpl;
}
=======
protected String getPageDescription() {
return Messages.connectorImplementationDesc;
}
protected String getPageTitle() {
return Messages.connectorImplementationTitle;
}
@Override
public boolean canFinish() {
if(getContainer().getCurrentPage() instanceof AbstractDefinitionSelectionImpementationWizardPage){
return false;
}
return super.canFinish();
}
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@Override
public boolean performFinish() {
try {
getContainer().run(false, false, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
String implId = NamingUtils.toConnectorImplementationFilename(implWorkingCopy.getImplementationId(),implWorkingCopy.getImplementationVersion(),false);
String implFileName = implId+"."+ConnectorImplRepositoryStore.CONNECTOR_IMPL_EXT;
if(editMode){
final String qualifiedClassname = implWorkingCopy.getImplementationClassname() ;
final IRepositoryFileStore file = sourceStore.getChild(ClassGenerator.getAbstractClassName(originalImpl.getImplementationClassname())) ;
if(file != null){
file.delete() ;
}
if(!originalImpl.getImplementationClassname().equals(implWorkingCopy.getImplementationClassname())){
SourceFileStore sourceFile = (SourceFileStore) sourceStore.getChild(originalImpl.getImplementationClassname()) ;
if(sourceFile != null){
sourceFile.rename(qualifiedClassname) ;
try {
ClassGenerator.updateConnectorImplementationAbstractClassName(implWorkingCopy, ClassGenerator.getAbstractClassName(originalImpl.getImplementationClassname()), sourceFile, monitor);
} catch (Exception e) {
BonitaStudioLog.error(e);
}
}
}
if(!fileStore.getName().equals(implFileName)){
fileStore.delete() ;
}
}
fileStore = implStore.createRepositoryFileStore(implFileName) ;
fileStore.save(implWorkingCopy) ;
try {
ConnectorDefinition definition = ((IDefinitionRepositoryStore) defStore).getDefinition(implWorkingCopy.getDefinitionId(),implWorkingCopy.getDefinitionVersion()) ;
ClassGenerator.generateConnectorImplementationAbstractClass(implWorkingCopy,definition,getAbstractClassName(),sourceStore, monitor) ;
fileToOpen = ClassGenerator.generateConnectorImplementationClass(implWorkingCopy,definition,sourceStore, monitor) ;
} catch (Exception e) {
BonitaStudioLog.error(e) ;
}
monitor.done() ;
}
});
} catch (Exception e){
BonitaStudioLog.error(e) ;
}
if(fileToOpen != null){
BusyIndicator.showWhile(Display.getDefault(),new Runnable() {
@Override
public void run() {
//need to get the acive page from the UI shell
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
IEditorPart part = IDE.openEditor(page, new FileEditorInput(fileToOpen), BonitaJavaEditor.ID);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveEditor(part, false);
} catch (PartInitException e) {
}
}
});
}
return true;
}
protected String getAbstractClassName() {
return AbstractConnector.class.getName();
}
public ConnectorImplementation getOriginalImplementation() {
return originalImpl;
}
>>>>>>>
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@Override
public boolean performFinish() {
try {
getContainer().run(false, false, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
String implId = NamingUtils.toConnectorImplementationFilename(implWorkingCopy.getImplementationId(),implWorkingCopy.getImplementationVersion(),false);
String implFileName = implId+"."+ConnectorImplRepositoryStore.CONNECTOR_IMPL_EXT;
if(editMode){
final String qualifiedClassname = implWorkingCopy.getImplementationClassname() ;
final IRepositoryFileStore file = sourceStore.getChild(ClassGenerator.getAbstractClassName(originalImpl.getImplementationClassname())) ;
if(file != null){
file.delete() ;
}
if(!originalImpl.getImplementationClassname().equals(implWorkingCopy.getImplementationClassname())){
SourceFileStore sourceFile = (SourceFileStore) sourceStore.getChild(originalImpl.getImplementationClassname()) ;
if(sourceFile != null){
sourceFile.rename(qualifiedClassname) ;
try {
ClassGenerator.updateConnectorImplementationAbstractClassName(implWorkingCopy, ClassGenerator.getAbstractClassName(originalImpl.getImplementationClassname()), sourceFile, monitor);
} catch (Exception e) {
BonitaStudioLog.error(e);
}
}
}
if(!fileStore.getName().equals(implFileName)){
fileStore.delete() ;
}
}
fileStore = implStore.createRepositoryFileStore(implFileName) ;
fileStore.save(implWorkingCopy) ;
try {
ConnectorDefinition definition = ((IDefinitionRepositoryStore) defStore).getDefinition(implWorkingCopy.getDefinitionId(),implWorkingCopy.getDefinitionVersion()) ;
ClassGenerator.generateConnectorImplementationAbstractClass(implWorkingCopy,definition,getAbstractClassName(),sourceStore, monitor) ;
fileToOpen = ClassGenerator.generateConnectorImplementationClass(implWorkingCopy,definition,sourceStore, monitor) ;
} catch (Exception e) {
BonitaStudioLog.error(e) ;
}
monitor.done() ;
}
});
} catch (Exception e){
BonitaStudioLog.error(e) ;
}
if(fileToOpen != null){
BusyIndicator.showWhile(Display.getDefault(),new Runnable() {
@Override
public void run() {
//need to get the acive page from the UI shell
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
IEditorPart part = IDE.openEditor(page, new FileEditorInput(fileToOpen), BonitaJavaEditor.ID);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveEditor(part, false);
} catch (PartInitException e) {
}
}
});
}
return true;
}
@Override
public boolean canFinish() {
if(getContainer().getCurrentPage() instanceof AbstractDefinitionSelectionImpementationWizardPage){
return false;
}
return super.canFinish();
}
protected String getAbstractClassName() {
return AbstractConnector.class.getName();
}
public ConnectorImplementation getOriginalImplementation() {
return originalImpl;
} |
<<<<<<<
* Copyright (C) 2012-2014 Bonitasoft S.A.
* Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
=======
* Copyright (C) 2012 BonitaSoft S.A.
* BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
*
>>>>>>>
* Copyright (C) 2012-2014 Bonitasoft S.A.
* Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
<<<<<<<
=======
*
>>>>>>>
<<<<<<<
=======
*
>>>>>>>
<<<<<<<
import org.bonitasoft.studio.common.emf.tools.ExpressionHelper;
=======
import org.bonitasoft.studio.common.databinding.CustomEMFEditObservables;
>>>>>>>
import org.bonitasoft.studio.common.emf.tools.ExpressionHelper;
<<<<<<<
=======
*
>>>>>>>
<<<<<<<
private boolean editing = false;
protected EObject context;
=======
//private final boolean editing = false;
private EObject context;
>>>>>>>
//private final boolean editing = false;
protected EObject context;
<<<<<<<
clearExpression(type);
textControl.setText("");
validate();
refresh();
}
private void clearExpression(final String type) {
=======
final EditingDomain editingDomain = getEditingDomain();
>>>>>>>
clearExpression(type);
textControl.setText("");
validate();
refresh();
}
private void clearExpression(final String type) {
final EditingDomain editingDomain = getEditingDomain();
<<<<<<<
updateSelection(new CompoundCommand(), newExpression);
setSelection(new StructuredSelection(selectedExpression));
=======
updateSelection(newExpression);
// setSelection(new StructuredSelection(selectedExpression));
final Expression selectedExpression = getSelectedExpression();
final EditingDomain editingDomain = getEditingDomain();
>>>>>>>
updateSelection(new CompoundCommand(), newExpression);
// setSelection(new StructuredSelection(selectedExpression));
final Expression selectedExpression = getSelectedExpression();
final EditingDomain editingDomain = getEditingDomain();
<<<<<<<
private void updateAutoCompletionContentProposalAdapter() {
if (ExpressionConstants.CONDITION_TYPE.equals(selectedExpression.getType())) {
autoCompletion.getContentProposalAdapter().setEnabled(false);
autoCompletion.getContentProposalAdapter().setProposalAcceptanceStyle(
ContentProposalAdapter.PROPOSAL_INSERT);
} else {
autoCompletion.getContentProposalAdapter().setEnabled(true);
autoCompletion.getContentProposalAdapter().setProposalAcceptanceStyle(
ContentProposalAdapter.PROPOSAL_REPLACE);
}
}
protected void updateSelection(final CompoundCommand cc, final Expression expression) {
new ExpressionSynchronizer(editingDomain, expression, selectedExpression).synchronize(cc);
=======
protected void updateSelection(final Expression expression) {
new ExpressionSynchronizer(getEditingDomain(), expression, getSelectedExpression()).synchronize();
>>>>>>>
private void updateAutoCompletionContentProposalAdapter() {
if (ExpressionConstants.CONDITION_TYPE.equals(getSelectedExpression().getType())) {
autoCompletion.getContentProposalAdapter().setEnabled(false);
autoCompletion.getContentProposalAdapter().setProposalAcceptanceStyle(
ContentProposalAdapter.PROPOSAL_INSERT);
} else {
autoCompletion.getContentProposalAdapter().setEnabled(true);
autoCompletion.getContentProposalAdapter().setProposalAcceptanceStyle(
ContentProposalAdapter.PROPOSAL_REPLACE);
}
}
protected void updateSelection(final CompoundCommand cc, final Expression expression) {
new ExpressionSynchronizer(getEditingDomain(), expression, getSelectedExpression()).synchronize(cc);
<<<<<<<
final IObservableValue nameObservable = createNameObservableValue();
final IObservableValue typeObservable = createTypeObservableValue();
=======
final IObservableValue nameObservable = getExpressionNameObservable();
final IObservableValue typeObservable = getExpressionTypeObservable();
>>>>>>>
final IObservableValue nameObservable = getExpressionNameObservable();
final IObservableValue typeObservable = getExpressionTypeObservable();
<<<<<<<
private IObservableValue createTypeObservableValue() {
IObservableValue typeObservable = null;
if (editingDomain != null) {
typeObservable = EMFEditProperties.value(editingDomain, ExpressionPackage.Literals.EXPRESSION__TYPE)
.observeDetail(ViewerProperties.singleSelection().observe(this));
} else {
typeObservable = EMFProperties.value(ExpressionPackage.Literals.EXPRESSION__TYPE).observeDetail(
ViewerProperties.singleSelection().observe(this));
}
return typeObservable;
}
private IObservableValue createNameObservableValue() {
IObservableValue nameObservable = null;
if (editingDomain != null) {
nameObservable = EMFEditProperties.value(editingDomain, ExpressionPackage.Literals.EXPRESSION__NAME)
.observeDetail(ViewerProperties.singleSelection().observe(this));
} else {
nameObservable = EMFProperties.value(ExpressionPackage.Literals.EXPRESSION__NAME).observeDetail(
ViewerProperties.singleSelection().observe(this));
}
return nameObservable;
}
=======
protected IObservableValue getExpressionNameObservable() {
IObservableValue nameObservable;
final EditingDomain editingDomain = getEditingDomain();
if (editingDomain != null) {
nameObservable = CustomEMFEditObservables.observeDetailValue(Realm.getDefault(), getSelectedExpressionObservable(),
ExpressionPackage.Literals.EXPRESSION__NAME);
} else {
nameObservable = EMFObservables.observeDetailValue(Realm.getDefault(), getSelectedExpressionObservable(),
ExpressionPackage.Literals.EXPRESSION__NAME);
}
return nameObservable;
}
protected IObservableValue getExpressionTypeObservable() {
IObservableValue nameObservable;
final EditingDomain editingDomain = getEditingDomain();
if (editingDomain != null) {
nameObservable = CustomEMFEditObservables.observeDetailValue(Realm.getDefault(), getSelectedExpressionObservable(),
ExpressionPackage.Literals.EXPRESSION__TYPE);
} else {
nameObservable = EMFObservables.observeDetailValue(Realm.getDefault(), getSelectedExpressionObservable(),
ExpressionPackage.Literals.EXPRESSION__TYPE);
}
return nameObservable;
}
private IObservableValue getSelectedExpressionObservable() {
return ViewersObservables.observeSingleSelection(this);
}
>>>>>>>
protected IObservableValue getExpressionNameObservable() {
IObservableValue nameObservable;
final EditingDomain editingDomain = getEditingDomain();
if (editingDomain != null) {
nameObservable = CustomEMFEditObservables.observeDetailValue(Realm.getDefault(), getSelectedExpressionObservable(),
ExpressionPackage.Literals.EXPRESSION__NAME);
} else {
nameObservable = EMFObservables.observeDetailValue(Realm.getDefault(), getSelectedExpressionObservable(),
ExpressionPackage.Literals.EXPRESSION__NAME);
}
return nameObservable;
}
protected IObservableValue getExpressionTypeObservable() {
IObservableValue nameObservable;
final EditingDomain editingDomain = getEditingDomain();
if (editingDomain != null) {
nameObservable = CustomEMFEditObservables.observeDetailValue(Realm.getDefault(), getSelectedExpressionObservable(),
ExpressionPackage.Literals.EXPRESSION__TYPE);
} else {
nameObservable = EMFObservables.observeDetailValue(Realm.getDefault(), getSelectedExpressionObservable(),
ExpressionPackage.Literals.EXPRESSION__TYPE);
}
return nameObservable;
}
private IObservableValue getSelectedExpressionObservable() {
return ViewersObservables.observeSingleSelection(this);
}
<<<<<<<
refreshTypeDecoration();
=======
final Expression selectedExpression = getSelectedExpression();
final ILabelProvider labelProvider = (ILabelProvider) getLabelProvider();
final Image icon = getLabelProviderImage(labelProvider, selectedExpression);
final ExpressionTypeLabelProvider expTypeProvider = new ExpressionTypeLabelProvider();
final String desc = expTypeProvider.getText(selectedExpression.getType());
typeDecoration.setImage(icon);
typeDecoration.setDescriptionText(desc);
if (selectedExpression.getName() == null || selectedExpression.getName().isEmpty()) {
if (!ExpressionConstants.CONDITION_TYPE.equals(selectedExpression.getType())) {
if (typeDecoration.isVisible()) {
typeDecoration.hide();
}
}
} else {
if (!typeDecoration.isVisible()) {
typeDecoration.show();
}
}
>>>>>>>
refreshTypeDecoration();
} else {
if (!typeDecoration.isVisible()) {
typeDecoration.show();
<<<<<<<
final CompoundCommand cc = new CompoundCommand("Update Expression (and potential side components)");
=======
final Expression selectedExpression = getSelectedExpression();
>>>>>>>
final Expression selectedExpression = getSelectedExpression();
final CompoundCommand cc = new CompoundCommand("Update Expression (and potential side components)"); |
<<<<<<<
@Override
protected void hookRootFigure() {
super.hookRootFigure();
org.eclipse.swt.widgets.Control c = getControl();
if(c instanceof FigureCanvas){
c.getParent().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
System.out.println("I'm disposed");
}
});
}
}
=======
@Override
protected LightweightSystem createLightweightSystem() {
return new AsyncLightweightSystem();
}
>>>>>>>
protected LightweightSystem createLightweightSystem() {
return new AsyncLightweightSystem();
} |
<<<<<<<
import org.bonitasoft.studio.model.process.builders.ActivityBuilder;
=======
import org.bonitasoft.studio.model.process.builders.ActorFilterBuilder;
>>>>>>>
import org.bonitasoft.studio.model.process.builders.ActorFilterBuilder;
import org.bonitasoft.studio.model.process.builders.ActivityBuilder;
<<<<<<<
@Test
public void testAddDataForMultiInstanceIterator_WithBusinessData() {
final Data collectionDataToMultiInstantiate = BusinessObjectDataBuilder.aBusinessData().withName("bData").withClassname("classname").build();
final Pool pool = PoolBuilder.aPool()
.havingElements(
ActivityBuilder.anActivity()
.havingCollectionDataToMultiInstantiate(collectionDataToMultiInstantiate)
.havingIteratorExpression(ExpressionBuilder.anExpression()
.withExpressionType(ExpressionConstants.MULTIINSTANCE_ITERATOR_TYPE).withReturnType(String.class.getName())
.withName("bData")))
.havingData(collectionDataToMultiInstantiate)
.build();
flowElementSwitch.addDataForMultiInstanceIterator(activityDefinitionBuilder, ((Activity) pool.getElements().get(0)).getIteratorExpression(),
collectionDataToMultiInstantiate);
verify(activityDefinitionBuilder).addBusinessData(anyString(), anyString());
}
@Test
public void testAddDataForMultiInstanceIterator_WithProcessData() {
final Data collectionDataToMultiInstantiate = DataBuilder.aData().withName("pData").havingDataType(StringDataTypeBuilder.aStringDataType()).build();
final Pool pool = PoolBuilder.aPool()
.havingElements(
ActivityBuilder.anActivity()
.havingCollectionDataToMultiInstantiate(collectionDataToMultiInstantiate)
.havingIteratorExpression(ExpressionBuilder.anExpression()
.withExpressionType(ExpressionConstants.MULTIINSTANCE_ITERATOR_TYPE).withReturnType(String.class.getName())
.withName("pData")))
.havingData(collectionDataToMultiInstantiate)
.build();
flowElementSwitch.addDataForMultiInstanceIterator(activityDefinitionBuilder, ((Activity) pool.getElements().get(0)).getIteratorExpression(),
collectionDataToMultiInstantiate);
verify(activityDefinitionBuilder).addData(anyString(), anyString(), any(Expression.class));
}
=======
@Test
public void testAddUserFilterToTask_withTableExpression() {
final TableExpression tableExpression = ExpressionFactory.eINSTANCE.createTableExpression();
final ListExpression listExpression = ExpressionFactory.eINSTANCE.createListExpression();
listExpression.getExpressions().add(ExpressionBuilder.aConstantExpression().withName("test").build());
tableExpression.getExpressions().add(listExpression);
final ActorFilter actorFilter = ActorFilterBuilder.anActorFilter().havingConfiguration(
ConnectorConfigurationBuilder.aConnectorConfiguration().havingParameters(
ConnectorParameterBuilder.aConnectorParameter().withKey("plop").havingExpression(tableExpression))).build();
flowElementSwitch.addUserFilterToTask(taskBuilder, "actor", actorFilter);
verify(userFilterBuilder).addInput(anyString(), any(Expression.class));
}
@Test
public void testAddUserFilterToTask_withEmptyOptionalInputs() {
final ActorFilter actorFilter = ActorFilterBuilder.anActorFilter().havingConfiguration(
ConnectorConfigurationBuilder.aConnectorConfiguration().havingParameters(
ConnectorParameterBuilder.aConnectorParameter().withKey("plop"))).build();
flowElementSwitch.addUserFilterToTask(taskBuilder, "actor", actorFilter);
verify(userFilterBuilder, never()).addInput(anyString(), any(Expression.class));
}
>>>>>>>
@Test
public void testAddUserFilterToTask_withTableExpression() {
final TableExpression tableExpression = ExpressionFactory.eINSTANCE.createTableExpression();
final ListExpression listExpression = ExpressionFactory.eINSTANCE.createListExpression();
listExpression.getExpressions().add(ExpressionBuilder.aConstantExpression().withName("test").build());
tableExpression.getExpressions().add(listExpression);
final ActorFilter actorFilter = ActorFilterBuilder.anActorFilter().havingConfiguration(
ConnectorConfigurationBuilder.aConnectorConfiguration().havingParameters(
ConnectorParameterBuilder.aConnectorParameter().withKey("plop").havingExpression(tableExpression))).build();
flowElementSwitch.addUserFilterToTask(taskBuilder, "actor", actorFilter);
verify(userFilterBuilder).addInput(anyString(), any(Expression.class));
}
@Test
public void testAddUserFilterToTask_withEmptyOptionalInputs() {
final ActorFilter actorFilter = ActorFilterBuilder.anActorFilter().havingConfiguration(
ConnectorConfigurationBuilder.aConnectorConfiguration().havingParameters(
ConnectorParameterBuilder.aConnectorParameter().withKey("plop"))).build();
flowElementSwitch.addUserFilterToTask(taskBuilder, "actor", actorFilter);
verify(userFilterBuilder, never()).addInput(anyString(), any(Expression.class));
}
@Test
public void testAddDataForMultiInstanceIterator_WithBusinessData() {
final Data collectionDataToMultiInstantiate = BusinessObjectDataBuilder.aBusinessData().withName("bData").withClassname("classname").build();
final Pool pool = PoolBuilder.aPool()
.havingElements(
ActivityBuilder.anActivity()
.havingCollectionDataToMultiInstantiate(collectionDataToMultiInstantiate)
.havingIteratorExpression(ExpressionBuilder.anExpression()
.withExpressionType(ExpressionConstants.MULTIINSTANCE_ITERATOR_TYPE).withReturnType(String.class.getName())
.withName("bData")))
.havingData(collectionDataToMultiInstantiate)
.build();
flowElementSwitch.addDataForMultiInstanceIterator(activityDefinitionBuilder, ((Activity) pool.getElements().get(0)).getIteratorExpression(),
collectionDataToMultiInstantiate);
verify(activityDefinitionBuilder).addBusinessData(anyString(), anyString());
}
@Test
public void testAddDataForMultiInstanceIterator_WithProcessData() {
final Data collectionDataToMultiInstantiate = DataBuilder.aData().withName("pData").havingDataType(StringDataTypeBuilder.aStringDataType()).build();
final Pool pool = PoolBuilder.aPool()
.havingElements(
ActivityBuilder.anActivity()
.havingCollectionDataToMultiInstantiate(collectionDataToMultiInstantiate)
.havingIteratorExpression(ExpressionBuilder.anExpression()
.withExpressionType(ExpressionConstants.MULTIINSTANCE_ITERATOR_TYPE).withReturnType(String.class.getName())
.withName("pData")))
.havingData(collectionDataToMultiInstantiate)
.build();
flowElementSwitch.addDataForMultiInstanceIterator(activityDefinitionBuilder, ((Activity) pool.getElements().get(0)).getIteratorExpression(),
collectionDataToMultiInstantiate);
verify(activityDefinitionBuilder).addData(anyString(), anyString(), any(Expression.class));
} |
<<<<<<<
import org.bonitasoft.studio.common.emf.tools.ExpressionHelper;
import org.bonitasoft.studio.common.emf.tools.ModelHelper;
=======
>>>>>>>
import org.bonitasoft.studio.common.emf.tools.ExpressionHelper;
<<<<<<<
=======
final List<Expression> dependenciesList = createDependenciesList(simpleExpression);
final List<Expression> toRemove = new ArrayList<Expression>();
for (final Expression expression : dependenciesList) {
if (!simpleExpression.getContent().contains("${" + expression.getName() + "}")) {
toRemove.add(expression);
}
}
dependenciesList.removeAll(toRemove);
exp.setDependencies(dependenciesList);
>>>>>>> |
<<<<<<<
import org.bonitasoft.studio.pagedesigner.core.bar.BarResourceCreationException;
import org.bonitasoft.studio.pagedesigner.core.bos.WebFormBOSArchiveFileStoreProvider;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
=======
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
>>>>>>>
import org.bonitasoft.studio.pagedesigner.core.bar.BarResourceCreationException;
import org.bonitasoft.studio.pagedesigner.core.bos.WebFormBOSArchiveFileStoreProvider;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
<<<<<<<
return new PageDesignerURLFactory(
InstanceScope.INSTANCE.getNode(BonitaStudioPreferencesPlugin.PLUGIN_ID));
}
@Override
public Set<IRepositoryFileStore> getRelatedFileStore() {
if (webFormBOSArchiveFileStoreProvider != null) {
try {
return webFormBOSArchiveFileStoreProvider.getRelatedFileStore(this);
} catch (BarResourceCreationException | IOException e) {
BonitaStudioLog.error("Failed to retrieve page related file store", e);
}
}
return super.getRelatedFileStore();
=======
return new PageDesignerURLFactory(InstanceScope.INSTANCE.getNode(BonitaStudioPreferencesPlugin.PLUGIN_ID));
>>>>>>>
return new PageDesignerURLFactory(InstanceScope.INSTANCE.getNode(BonitaStudioPreferencesPlugin.PLUGIN_ID));
}
@Override
public Set<IRepositoryFileStore> getRelatedFileStore() {
if (webFormBOSArchiveFileStoreProvider != null) {
try {
return webFormBOSArchiveFileStoreProvider.getRelatedFileStore(this);
} catch (BarResourceCreationException | IOException e) {
BonitaStudioLog.error("Failed to retrieve page related file store", e);
}
}
return super.getRelatedFileStore(); |
<<<<<<<
DocumentTypeMigrationIT.class,
=======
TestTokenDispatcher.class,
>>>>>>>
TestTokenDispatcher.class,
DocumentTypeMigrationIT.class, |
<<<<<<<
=======
@Override
public void postStartup() {
try {
IConfigurationElement[] elements = BonitaStudioExtensionRegistryManager.getInstance().getConfigurationElements("org.bonitasoft.studio.common.poststartup"); //$NON-NLS-1$
IPostStartupContribution contrib = null;
for (IConfigurationElement elem : elements){
try {
contrib = (IPostStartupContribution) elem.createExecutableExtension("class"); //$NON-NLS-1$
} catch (CoreException e) {
BonitaStudioLog.error(e);
}
contrib.execute();
}
buildWorkspace();
if (PlatformUI.isWorkbenchRunning()) {
IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
PlatformUI.getWorkbench().showPerspective(PerspectiveIDRegistry.PROCESS_PERSPECTIVE_ID, activeWorkbenchWindow);
if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getPerspective() != null) {
PlatformUI.getWorkbench().getIntroManager().showIntro(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), false);
}
}
long startupDuration = System.currentTimeMillis() - BonitaStudioApplication.START_TIME ;
BonitaStudioLog.info("Startup duration : "+DateUtil.getDisplayDuration(startupDuration),ApplicationPlugin.PLUGIN_ID) ;
if (PlatformUI.isWorkbenchRunning()) {
sendUserInfo();
openStartupDialog() ;
}
} catch (WorkbenchException ex) {
BonitaStudioLog.error(ex);
}
}
private void buildWorkspace() {
try {
JavaCore.initializeAfterLoad(monitor);
} catch (CoreException e) {
BonitaStudioLog.error(e);
}
RepositoryManager.getInstance().getCurrentRepository().refresh(monitor);
}
>>>>>>>
@Override
public void postStartup() {
try {
IConfigurationElement[] elements = BonitaStudioExtensionRegistryManager.getInstance().getConfigurationElements("org.bonitasoft.studio.common.poststartup"); //$NON-NLS-1$
IPostStartupContribution contrib = null;
for (IConfigurationElement elem : elements){
try {
contrib = (IPostStartupContribution) elem.createExecutableExtension("class"); //$NON-NLS-1$
} catch (CoreException e) {
BonitaStudioLog.error(e);
}
contrib.execute();
}
buildWorkspace();
if (PlatformUI.isWorkbenchRunning()) {
IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
PlatformUI.getWorkbench().showPerspective(PerspectiveIDRegistry.PROCESS_PERSPECTIVE_ID, activeWorkbenchWindow);
if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getPerspective() != null) {
PlatformUI.getWorkbench().getIntroManager().showIntro(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), false);
}
}
long startupDuration = System.currentTimeMillis() - BonitaStudioApplication.START_TIME ;
BonitaStudioLog.info("Startup duration : "+DateUtil.getDisplayDuration(startupDuration),ApplicationPlugin.PLUGIN_ID) ;
if (PlatformUI.isWorkbenchRunning()) {
sendUserInfo();
openStartupDialog() ;
}
} catch (WorkbenchException ex) {
BonitaStudioLog.error(ex);
}
}
private void buildWorkspace() {
try {
JavaCore.initializeAfterLoad(monitor);
} catch (CoreException e) {
BonitaStudioLog.error(e);
}
RepositoryManager.getInstance().getCurrentRepository().refresh(monitor);
}
<<<<<<<
=======
@Override
public boolean preShutdown() {
Job.getJobManager().cancel(StartEngineJob.FAMILY);
boolean returnValue = super.preShutdown();
if(returnValue){
try {
if(PlatformUI.isWorkbenchRunning() && PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null && PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null){
boolean closeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(true) ;
if(closeEditor){
PlatformUI.getWorkbench().getProgressService().run(true, false, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,InterruptedException {
monitor.beginTask(Messages.shuttingDown, IProgressMonitor.UNKNOWN) ;
IConfigurationElement[] elements = BonitaStudioExtensionRegistryManager.getInstance().getConfigurationElements("org.bonitasoft.studio.application.preshutdown"); //$NON-NLS-1$
IPreShutdownContribution contrib = null;
for (IConfigurationElement elem : elements){
try {
contrib = (IPreShutdownContribution) elem.createExecutableExtension("class"); //$NON-NLS-1$
} catch (CoreException e) {
BonitaStudioLog.error(e);
}
contrib.execute();
}
if(BOSEngineManager.getInstance().isRunning()){
BOSEngineManager.getInstance().stop() ;
}
FileUtil.deleteDir(ProjectUtil.getBonitaStudioWorkFolder());
monitor.done() ;
}
}) ;
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllPerspectives(false, true);
}
return closeEditor ;
}
} catch (Exception e){
BonitaStudioLog.error(e) ;
}
}
return returnValue ;
}
>>>>>>> |
<<<<<<<
import org.bonitasoft.studio.tests.attachment.TestRunWithDocument;
import org.bonitasoft.studio.tests.contract.ContractIT;
=======
>>>>>>>
import org.bonitasoft.studio.tests.contract.ContractIT;
<<<<<<<
TestProcessDependencies.class,
ContractIT.class
=======
TestProcessDependencies.class,
RefactorWidgetIT.class,
ExportImportWithoutMigrationIT.class
>>>>>>>
TestProcessDependencies.class,
ContractIT.class,
RefactorWidgetIT.class,
ExportImportWithoutMigrationIT.class |
<<<<<<<
import org.bonitasoft.studio.refactoring.core.RefactorDataOperation;
=======
import org.bonitasoft.studio.swt.AbstractSWTTestCase;
>>>>>>>
import org.bonitasoft.studio.refactoring.core.RefactorDataOperation;
import org.bonitasoft.studio.swt.AbstractSWTTestCase; |
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
=======
import org.bonitasoft.studio.model.process.Task;
import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.conversion.Converter;
import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
>>>>>>>
import org.bonitasoft.studio.model.process.Task;
import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
<<<<<<<
=======
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.common.util.EList;
>>>>>>>
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.common.util.EList;
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
=======
private final OperationReturnTypesValidator operationReturnTypeValidator;
>>>>>>>
<<<<<<<
public OperationViewer(final Composite parent, final TabbedPropertySheetWidgetFactory widgetFactory, final EditingDomain editingDomain, final ViewerFilter actionExpressionFilter,
final ViewerFilter storageExpressionFilter, final boolean isPageFlowContext) {
=======
public OperationViewer(final Composite parent, final TabbedPropertySheetWidgetFactory widgetFactory, final EditingDomain editingDomain,
final ViewerFilter actionExpressionFilter,
final ViewerFilter storageExpressionFilter, final boolean isPageFlowContext) {
>>>>>>>
public OperationViewer(final Composite parent, final TabbedPropertySheetWidgetFactory widgetFactory, final EditingDomain editingDomain,
final ViewerFilter actionExpressionFilter,
final ViewerFilter storageExpressionFilter, final boolean isPageFlowContext) {
<<<<<<<
public OperationViewer(final Composite parent, final TabbedPropertySheetWidgetFactory widgetFactory, final EditingDomain editingDomain, final ViewerFilter actionExpressionFilter,
final ViewerFilter storageExpressionFilter) {
=======
public OperationViewer(final Composite parent, final TabbedPropertySheetWidgetFactory widgetFactory, final EditingDomain editingDomain,
final ViewerFilter actionExpressionFilter,
final ViewerFilter storageExpressionFilter) {
>>>>>>>
public OperationViewer(final Composite parent, final TabbedPropertySheetWidgetFactory widgetFactory, final EditingDomain editingDomain,
final ViewerFilter actionExpressionFilter,
final ViewerFilter storageExpressionFilter) {
<<<<<<<
final Operator newOperator = dialog.getOperator();
if (editingDomain == null) {
action.setOperator(newOperator);
} else {
editingDomain.getCommandStack().execute(
SetCommand.create(editingDomain, action, ExpressionPackage.Literals.OPERATION__OPERATOR, newOperator));
}
operatorLabel.setText("<A>" + labelProvider.getText(newOperator) + "</A>");
if (newOperator.getExpression() != null && !newOperator.getType().equals(ExpressionConstants.ASSIGNMENT_OPERATOR)
&& !newOperator.getExpression().isEmpty()) {
operatorTooltip.setText(newOperator.getExpression());
}
actionExpression.validate();
actionExpression.getControl().setVisible(!newOperator.getType().equals(ExpressionConstants.DELETION_OPERATOR));
=======
final Operator newOperator = updateModelOperator(action, dialog);
getActionExpression().validate();
getActionExpression().getControl().setVisible(!newOperator.getType().equals(ExpressionConstants.DELETION_OPERATOR));
operatorLabel.update();
>>>>>>>
final Operator newOperator = updateModelOperator(action, dialog);
getActionExpression().validate();
getActionExpression().getControl().setVisible(!newOperator.getType().equals(ExpressionConstants.DELETION_OPERATOR));
operatorLabel.update();
<<<<<<<
operatorLink.setText("<A>" + labelProvider.getText(op) + "</A>");
// actionExpression.validate();
actionExpression.getControl().setVisible(true);
operatorLink.getParent().layout(true, true);
=======
getActionExpression().validate();
getActionExpression().getControl().setVisible(true);
getOperatorLink().getParent().layout(true, true);
>>>>>>>
getActionExpression().validate();
getActionExpression().getControl().setVisible(true);
getOperatorLink().getParent().layout(true, true);
<<<<<<<
public void addActionExpressionValidator(final IExpressionValidator validator) {
actionExpression.addExpressionValidator(validator);
=======
public void addActionExpressionValidator(final String expressionType, final IExpressionValidator validator) {
getActionExpression().addExpressionValidator(expressionType, validator);
>>>>>>>
public void addActionExpressionValidator(final IExpressionValidator validator) {
getActionExpression().addExpressionValidator(validator); |
<<<<<<<
=======
@Override
protected void bindValue() {
final IViewerObservableValue observeSingleSelection = ViewersObservables.observeSingleSelection(explorer.getRightTableViewer());
context.bindValue(observeSingleSelection, EMFObservables.observeValue(implementation, ConnectorImplementationPackage.Literals.CONNECTOR_IMPLEMENTATION__DEFINITION_ID),defIdStrategy,defModelStrategy) ;
context.bindValue(ViewersObservables.observeSingleSelection(versionCombo), EMFObservables.observeValue(implementation, ConnectorImplementationPackage.Literals.CONNECTOR_IMPLEMENTATION__DEFINITION_VERSION));
}
>>>>>>>
@Override
protected void bindValue() {
final IViewerObservableValue observeSingleSelection = ViewersObservables.observeSingleSelection(explorer.getRightTableViewer());
context.bindValue(observeSingleSelection, EMFObservables.observeValue(implementation, ConnectorImplementationPackage.Literals.CONNECTOR_IMPLEMENTATION__DEFINITION_ID),defIdStrategy,defModelStrategy) ;
context.bindValue(ViewersObservables.observeSingleSelection(versionCombo), EMFObservables.observeValue(implementation, ConnectorImplementationPackage.Literals.CONNECTOR_IMPLEMENTATION__DEFINITION_VERSION));
}
<<<<<<<
protected String getPageDescription() {
return Messages.connectorImplementationDesc;
}
protected String getPageTitle() {
return Messages.connectorImplementationTitle;
}
=======
protected String getPageDescription() {
return Messages.connectorImplementationDesc;
}
>>>>>>>
protected String getPageDescription() {
return Messages.connectorImplementationDesc;
}
protected String getPageTitle() {
return Messages.connectorImplementationTitle;
}
<<<<<<<
protected String getAbstractClassName() {
return AbstractConnector.class.getName();
}
public ConnectorImplementation getOriginalImplementation() {
return originalImpl;
}
=======
@Override
public boolean performFinish() {
try {
getContainer().run(false, false, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
String implId = NamingUtils.toConnectorImplementationFilename(implWorkingCopy.getImplementationId(),implWorkingCopy.getImplementationVersion(),false);
String implFileName = implId+"."+ConnectorImplRepositoryStore.CONNECTOR_IMPL_EXT;
if(editMode){
final String qualifiedClassname = implWorkingCopy.getImplementationClassname() ;
final IRepositoryFileStore file = sourceStore.getChild(ClassGenerator.getAbstractClassName(originalImpl.getImplementationClassname())) ;
if(file != null){
file.delete() ;
}
if(!originalImpl.getImplementationClassname().equals(implWorkingCopy.getImplementationClassname())){
SourceFileStore sourceFile = (SourceFileStore) sourceStore.getChild(originalImpl.getImplementationClassname()) ;
if(sourceFile != null){
sourceFile.rename(qualifiedClassname) ;
try {
ClassGenerator.updateConnectorImplementationAbstractClassName(implWorkingCopy, ClassGenerator.getAbstractClassName(originalImpl.getImplementationClassname()), sourceFile, monitor);
} catch (Exception e) {
BonitaStudioLog.error(e);
}
}
}
if(!fileStore.getName().equals(implFileName)){
fileStore.delete() ;
}
}
fileStore = implStore.createRepositoryFileStore(implFileName) ;
fileStore.save(implWorkingCopy) ;
try {
ConnectorDefinition definition = ((IDefinitionRepositoryStore) defStore).getDefinition(implWorkingCopy.getDefinitionId(),implWorkingCopy.getDefinitionVersion()) ;
ClassGenerator.generateConnectorImplementationAbstractClass(implWorkingCopy,definition,getAbstractClassName(),sourceStore, monitor) ;
fileToOpen = ClassGenerator.generateConnectorImplementationClass(implWorkingCopy,definition,sourceStore, monitor) ;
} catch (Exception e) {
BonitaStudioLog.error(e) ;
}
monitor.done() ;
}
});
} catch (Exception e){
BonitaStudioLog.error(e) ;
}
if(fileToOpen != null){
BusyIndicator.showWhile(Display.getDefault(),new Runnable() {
@Override
public void run() {
//need to get the acive page from the UI shell
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
IEditorPart part = IDE.openEditor(page, new FileEditorInput(fileToOpen), BonitaJavaEditor.ID);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveEditor(part, false);
} catch (PartInitException e) {
}
}
});
}
return true;
}
protected String getAbstractClassName() {
return AbstractConnector.class.getName();
}
public ConnectorImplementation getOriginalImplementation() {
return originalImpl;
}
>>>>>>>
protected String getAbstractClassName() {
return AbstractConnector.class.getName();
}
public ConnectorImplementation getOriginalImplementation() {
return originalImpl;
} |
<<<<<<<
@Test
public void should_find_correct_file_store_if_two_files_have_the_same_name() {
FileStoreFinder finder = spy(FileStoreFinder.class);
IFile file = mock(IFile.class);
IFolder parent = mock(IFolder.class);
when(parent.getName()).thenReturn(ORGANIZATION_FOLDER_NAME);
when(file.getName()).thenReturn(FILE_NAME);
when(file.getParent()).thenReturn(parent);
IStructuredSelection selection = new StructuredSelection(file);
doReturn(Optional.of(selection)).when(finder).getCurrentStructuredSelection();
Repository repository = initRepository();
Optional<? extends IRepositoryFileStore> selectedFileStore = finder.findSelectedFileStore(repository);
assertThat(selectedFileStore).isPresent();
assertThat(selectedFileStore.get().getName()).isEqualTo(FILE_NAME);
assertThat(selectedFileStore.get().getParentStore().getName()).isEqualTo(ORGANIZATION_FOLDER_NAME);
when(parent.getName()).thenReturn(DIAGRAMS_FOLDER_NAME);
selectedFileStore = finder.findSelectedFileStore(repository);
assertThat(selectedFileStore).isPresent();
assertThat(selectedFileStore.get().getName()).isEqualTo(FILE_NAME);
assertThat(selectedFileStore.get().getParentStore().getName()).isEqualTo(DIAGRAMS_FOLDER_NAME);
}
private Repository initRepository() {
Repository repository = mock(Repository.class);
IRepositoryStore<? extends IRepositoryFileStore> storeWithInterfaces = initStoreWithInterfaces();
IRepositoryStore<? extends IRepositoryFileStore> storeWithInterfaces2 = initStoreWithInterfaces2();
IRepositoryStore<? extends IRepositoryFileStore> storeWithoutInterface = initStoreWithoutInterface();
when(repository.getAllStores())
.thenReturn(Arrays.asList(storeWithInterfaces, storeWithInterfaces2, storeWithoutInterface));
return repository;
}
=======
>>>>>>> |
<<<<<<<
public static final String SWTBOT_ID_CONSTRAINT_ERROR_MESSAGE_TEXTEDITOR = "SWTBOT_ID_CONSTRAINT_ERROR_MESSAGE_TEXTEDITOR";
=======
public static final String SWTBOT_ID_MIGRATION_REPORT_TABLE = "org.bonitasoft.studio.importer.bar.reportTable";
>>>>>>>
public static final String SWTBOT_ID_MIGRATION_REPORT_TABLE = "org.bonitasoft.studio.importer.bar.reportTable";
public static final String SWTBOT_ID_CONSTRAINT_ERROR_MESSAGE_TEXTEDITOR = "SWTBOT_ID_CONSTRAINT_ERROR_MESSAGE_TEXTEDITOR"; |
<<<<<<<
@Override
public boolean isPageComplete() {
return super.isPageComplete() || userSingleSelectionObservable.getValue() == null;
}
=======
private boolean isNotUserSelected() {
return userSingleSelectionObservable == null || userSingleSelectionObservable.getValue() == null;
}
>>>>>>>
@Override
public boolean isPageComplete() {
return super.isPageComplete() || userSingleSelectionObservable.getValue() == null;
}
private boolean isNotUserSelected() {
return userSingleSelectionObservable == null || userSingleSelectionObservable.getValue() == null;
} |
<<<<<<<
public BotContractInputRow selectRow(final SWTGefBot bot, final int row) {
return new BotContractInputRow(bot, row);
}
public BotContractInputRow selectActiveRow(final SWTGefBot bot) {
final SWTBotTree treeWithId = bot.treeWithId(SWTBotConstants.SWTBOT_ID_CONTRACT_INPUT_TREE);
final TableCollection selection = treeWithId.selection();
final SWTBotTreeItem treeItem = treeWithId.getTreeItem(selection.get(0, 0));
System.out.println(treeItem);
return new BotContractInputRow(bot, selection.rowCount());
}
=======
public ICondition activeCondition() {
return new DefaultCondition() {
@Override
public boolean test() throws Exception {
return getSWTBotWidget().isActive() && getSWTBotWidget().isEnabled();
}
@Override
public String getFailureMessage() {
return "Tree is not active";
}
};
}
>>>>>>>
public BotContractInputRow selectRow(final SWTGefBot bot, final int row) {
return new BotContractInputRow(bot, row);
}
public BotContractInputRow selectActiveRow(final SWTGefBot bot) {
final SWTBotTree treeWithId = bot.treeWithId(SWTBotConstants.SWTBOT_ID_CONTRACT_INPUT_TREE);
final TableCollection selection = treeWithId.selection();
final SWTBotTreeItem treeItem = treeWithId.getTreeItem(selection.get(0, 0));
System.out.println(treeItem);
return new BotContractInputRow(bot, selection.rowCount());
}
public ICondition activeCondition() {
return new DefaultCondition() {
@Override
public boolean test() throws Exception {
return getSWTBotWidget().isActive() && getSWTBotWidget().isEnabled();
}
@Override
public String getFailureMessage() {
return "Tree is not active";
}
};
} |
<<<<<<<
=======
revealEditPart(editPart);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().setFocus();
>>>>>>>
revealEditPart(editPart); |
<<<<<<<
private ExpressionHelper() {
}
public static Expression createExpressionFromEnumType(final EnumType type){
=======
public static Expression createExpressionFromEnumType(final EnumType type) {
>>>>>>>
private ExpressionHelper() {
}
public static Expression createExpressionFromEnumType(final EnumType type) {
<<<<<<<
public static Expression createConstantExpression(final String name,final String content, final String returnClassName) {
final Expression exp = createConstantExpression(content, returnClassName);
=======
public static Expression createConstantExpression(final String name, final String content, final String returnClassName) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.CONSTANT_TYPE);
>>>>>>>
public static Expression createConstantExpression(final String name,final String content, final String returnClassName) {
final Expression exp = createConstantExpression(content, returnClassName);
<<<<<<<
return exp;
=======
exp.setContent(content);
exp.setReturnType(returnClassName);
return exp;
>>>>>>>
return exp;
<<<<<<<
public static Expression createExpressionFromEObject(final EObject element) {
if (element instanceof Data) {
return createVariableExpression((Data) element);
} else if (element instanceof Output) {
return createConnectorOutputExpression((Output) element);
} else if (element instanceof Parameter) {
return createParameterExpression((Parameter) element);
} else if (element instanceof org.bonitasoft.studio.model.expression.Expression) {
return (Expression) element;
} else if (element instanceof Widget) {
return createWidgetExpression((Widget) element);
} else if (element instanceof Document) {
return createDocumentReferenceExpression((Document) element);
}else if (element instanceof GroupIterator) {
return createGroupIteratorExpression((GroupIterator) element);
}
throw new IllegalArgumentException("element argument is not supported: " + element);
}
public static Expression createGroupIteratorExpression(final GroupIterator iterator) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression() ;
final String iteratorName = iterator.getName();
exp.setName(iteratorName);
exp.setContent(iteratorName);
String className = Object.class.getName();
if(iterator.getClassName() != null){
className = iterator.getClassName();
}
exp.setReturnType(className);
exp.setReturnTypeFixed(true);
exp.setType(ExpressionConstants.GROUP_ITERATOR_TYPE);
exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(iterator));
return exp;
}
public static Expression createDocumentReferenceExpression(final Document d) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.DOCUMENT_REF_TYPE);
exp.setContent(d.getName());
exp.setName(d.getName());
exp.setReturnType(String.class.getName());
exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(d));
return exp;
}
public static Expression createWidgetExpression(final Widget w) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.FORM_FIELD_TYPE);
exp.setContent(WidgetHelper.FIELD_PREFIX + w.getName());
exp.setName(WidgetHelper.FIELD_PREFIX + w.getName());
exp.setReturnType(WidgetHelper.getAssociatedReturnType(w));
final Widget copy = (Widget) ExpressionHelper.createDependencyFromEObject(w);
copy.getDependOn().clear();
exp.getReferencedElements().add(copy);
return exp;
}
public static Expression createConnectorOutputExpression(final Output output) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.CONNECTOR_OUTPUT_TYPE);
exp.setContent(output.getName());
exp.setName(output.getName());
exp.setReturnType(output.getType());
exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(output));
return exp;
}
public static Expression createParameterExpression(final Parameter p) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.PARAMETER_TYPE);
exp.setContent(p.getName());
exp.setName(p.getName());
exp.setReturnType(p.getTypeClassname());
exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(p));
return exp;
}
=======
public static Expression createListDocumentExpressionWithDependency(final String targetDocName) {
final Document document = ProcessFactory.eINSTANCE.createDocument();
document.setName(targetDocName);
document.setMultiple(true);
final Expression storageExpression = ExpressionFactory.eINSTANCE.createExpression();
storageExpression.setContent(targetDocName);
storageExpression.setName(targetDocName);
storageExpression.setType(ExpressionConstants.DOCUMENT_LIST_TYPE);
storageExpression.setReturnType(List.class.getName());
storageExpression.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(document));
return storageExpression;
}
public static Expression createDocumentExpressionWithDependency(final String targetDocName) {
final Document document = ProcessFactory.eINSTANCE.createDocument();
document.setName(targetDocName);
document.setMultiple(false);
final Expression storageExpression = ExpressionFactory.eINSTANCE.createExpression();
storageExpression.setContent(targetDocName);
storageExpression.setName(targetDocName);
storageExpression.setType(ExpressionConstants.DOCUMENT_TYPE);
storageExpression.setReturnType(String.class.getName());
storageExpression.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(document));
return storageExpression;
}
>>>>>>>
public static Expression createExpressionFromEObject(final EObject element) {
if (element instanceof Data) {
return createVariableExpression((Data) element);
} else if (element instanceof Output) {
return createConnectorOutputExpression((Output) element);
} else if (element instanceof Parameter) {
return createParameterExpression((Parameter) element);
} else if (element instanceof org.bonitasoft.studio.model.expression.Expression) {
return (Expression) element;
} else if (element instanceof Widget) {
return createWidgetExpression((Widget) element);
} else if (element instanceof Document) {
return createDocumentReferenceExpression((Document) element);
}else if (element instanceof GroupIterator) {
return createGroupIteratorExpression((GroupIterator) element);
}
throw new IllegalArgumentException("element argument is not supported: " + element);
}
public static Expression createGroupIteratorExpression(final GroupIterator iterator) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression() ;
final String iteratorName = iterator.getName();
exp.setName(iteratorName);
exp.setContent(iteratorName);
String className = Object.class.getName();
if(iterator.getClassName() != null){
className = iterator.getClassName();
}
exp.setReturnType(className);
exp.setReturnTypeFixed(true);
exp.setType(ExpressionConstants.GROUP_ITERATOR_TYPE);
exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(iterator));
return exp;
}
public static Expression createDocumentReferenceExpression(final Document d) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.DOCUMENT_REF_TYPE);
exp.setContent(d.getName());
exp.setName(d.getName());
exp.setReturnType(String.class.getName());
exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(d));
return exp;
}
public static Expression createWidgetExpression(final Widget w) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.FORM_FIELD_TYPE);
exp.setContent(WidgetHelper.FIELD_PREFIX + w.getName());
exp.setName(WidgetHelper.FIELD_PREFIX + w.getName());
exp.setReturnType(WidgetHelper.getAssociatedReturnType(w));
final Widget copy = (Widget) ExpressionHelper.createDependencyFromEObject(w);
copy.getDependOn().clear();
exp.getReferencedElements().add(copy);
return exp;
}
public static Expression createConnectorOutputExpression(final Output output) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.CONNECTOR_OUTPUT_TYPE);
exp.setContent(output.getName());
exp.setName(output.getName());
exp.setReturnType(output.getType());
exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(output));
return exp;
}
public static Expression createParameterExpression(final Parameter p) {
final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
exp.setType(ExpressionConstants.PARAMETER_TYPE);
exp.setContent(p.getName());
exp.setName(p.getName());
exp.setReturnType(p.getTypeClassname());
exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(p));
return exp;
}
public static Expression createListDocumentExpressionWithDependency(final String targetDocName) {
final Document document = ProcessFactory.eINSTANCE.createDocument();
document.setName(targetDocName);
document.setMultiple(true);
final Expression storageExpression = ExpressionFactory.eINSTANCE.createExpression();
storageExpression.setContent(targetDocName);
storageExpression.setName(targetDocName);
storageExpression.setType(ExpressionConstants.DOCUMENT_LIST_TYPE);
storageExpression.setReturnType(List.class.getName());
storageExpression.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(document));
return storageExpression;
}
public static Expression createDocumentExpressionWithDependency(final String targetDocName) {
final Document document = ProcessFactory.eINSTANCE.createDocument();
document.setName(targetDocName);
document.setMultiple(false);
final Expression storageExpression = ExpressionFactory.eINSTANCE.createExpression();
storageExpression.setContent(targetDocName);
storageExpression.setName(targetDocName);
storageExpression.setType(ExpressionConstants.DOCUMENT_TYPE);
storageExpression.setReturnType(String.class.getName());
storageExpression.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(document));
return storageExpression;
} |
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
*
=======
>>>>>>>
*
* @param bot
* @param taskName
* @param newDiagramName
*/
public static void changeDiagramName(final SWTGefBot bot, final String newDiagramName) {
final SWTBotEditor botEditor = bot.activeEditor();
final SWTBotGefEditor gmfEditor = bot.gefEditor(botEditor.getTitle());
gmfEditor.mainEditPart().click();
bot.viewById(SWTBotTestUtil.VIEWS_PROPERTIES_PROCESS_GENERAL).show();
bot.viewById(SWTBotTestUtil.VIEWS_PROPERTIES_PROCESS_GENERAL).setFocus();
selectTabbedPropertyView(bot, "Diagram");
bot.waitUntil(Conditions.widgetIsEnabled(bot.button(org.bonitasoft.studio.common.Messages.edit)));
bot.button(org.bonitasoft.studio.common.Messages.edit).click();
// Open new Shell
bot.waitUntil(Conditions.shellIsActive(org.bonitasoft.studio.common.Messages.openNameAndVersionDialogTitle));
bot.textWithLabel(org.bonitasoft.studio.common.Messages.name,0).setText(newDiagramName);
bot.button(IDialogConstants.OK_LABEL).click();
}
/**
<<<<<<<
bot.textWithLabel(org.bonitasoft.studio.common.Messages.name,0).setText(newDiagramName);
=======
bot.textWithLabel(org.bonitasoft.studio.common.Messages.name, 0).setText(newName);
>>>>>>>
bot.textWithLabel(org.bonitasoft.studio.common.Messages.name, 0).setText(newName);
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
/** Select an actor in a Human task in the list of Process Actor
*
=======
/**
* Select an actor in a Human task in the list of Process Actor
*
>>>>>>>
/**
* Select an actor in a Human task in the list of Process Actor
*
<<<<<<<
/** Select an actor and define it as an initiator
*
=======
/**
* Select an actor and define it as an initiator
*
>>>>>>>
/**
* Select an actor and define it as an initiator
*
<<<<<<<
/** Wait for the shell with its title name with the default timeout
*
=======
/**
* Wait for the shell with its title name with the default timeout
*
>>>>>>>
/**
* Wait for the shell with its title name with the default timeout
*
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
*
=======
>>>>>>>
<<<<<<<
/** Set the connector type and the select the connector specified in the parameters
*
=======
/**
* Set the connector type and the select the connector specified in the parameters
*
>>>>>>>
/**
* Set the connector type and the select the connector specified in the parameters
* |
<<<<<<<
import org.bonitasoft.studio.model.process.MultiInstantiation;
import org.bonitasoft.studio.model.process.ProcessPackage;
=======
import org.bonitasoft.studio.model.process.MultiInstanceType;
import org.bonitasoft.studio.model.process.MultiInstantiable;
>>>>>>>
import org.bonitasoft.studio.model.process.MultiInstanceType;
import org.bonitasoft.studio.model.process.MultiInstantiable;
<<<<<<<
import org.eclipse.emf.ecore.EStructuralFeature;
=======
>>>>>>> |
<<<<<<<
import org.bonitasoft.studio.model.process.DateType;
import org.bonitasoft.studio.model.process.DoubleType;
=======
import org.bonitasoft.studio.model.process.Document;
>>>>>>>
import org.bonitasoft.studio.model.process.DateType;
import org.bonitasoft.studio.model.process.Document;
import org.bonitasoft.studio.model.process.DoubleType;
<<<<<<<
private static List<AbstractProcess> findAllProcesses(final Element element, final List<AbstractProcess> processes) {
=======
public static FileWidgetInputType getDefaultFileWidgetInputType(final FileWidget widget) {
final Form parentForm = ModelHelper.getParentForm(widget);
if (parentForm == null) {
return FileWidgetInputType.RESOURCE;
}
if (ModelHelper.isAnEntryPageFlowOnAPool(parentForm)) {
return FileWidgetInputType.RESOURCE;
}
return FileWidgetInputType.DOCUMENT;
}
private static List<AbstractProcess> findAllProcesses(final Element element, final List<AbstractProcess> processes) {
>>>>>>>
public static FileWidgetInputType getDefaultFileWidgetInputType(final FileWidget widget) {
final Form parentForm = ModelHelper.getParentForm(widget);
if (parentForm == null) {
return FileWidgetInputType.RESOURCE;
}
if (ModelHelper.isAnEntryPageFlowOnAPool(parentForm)) {
return FileWidgetInputType.RESOURCE;
}
return FileWidgetInputType.DOCUMENT;
}
private static List<AbstractProcess> findAllProcesses(final Element element, final List<AbstractProcess> processes) {
<<<<<<<
public static StringType createStringDataType() {
final StringType stringDataType = ProcessFactory.eINSTANCE.createStringType();
stringDataType.setName(DataTypeLabels.stringDataType);
return stringDataType;
}
public static DoubleType createDoubleDataType() {
final DoubleType doubleDataType = ProcessFactory.eINSTANCE.createDoubleType();
doubleDataType.setName(DataTypeLabels.doubleDataType);
return doubleDataType;
}
public static LongType createLongDataType() {
final LongType longDataType = ProcessFactory.eINSTANCE.createLongType();
longDataType.setName(DataTypeLabels.longDataType);
return longDataType;
}
public static IntegerType createIntegerDataType() {
final IntegerType intDataType = ProcessFactory.eINSTANCE.createIntegerType();
intDataType.setName(DataTypeLabels.integerDataType);
return intDataType;
}
public static DateType createDateDataType() {
final DateType dateDataType = ProcessFactory.eINSTANCE.createDateType();
dateDataType.setName(DataTypeLabels.dateDataType);
return dateDataType;
}
public static BooleanType createBooleanDataType() {
final BooleanType boolDataType = ProcessFactory.eINSTANCE.createBooleanType();
boolDataType.setName(DataTypeLabels.booleanDataType);
return boolDataType;
}
public static DataType getDataTypeForID(final EObject elem, final String name) {
final MainProcess proc = getMainProcess(elem);
=======
public static DataType getDataTypeForID(final EObject elem, final String name) {
final MainProcess proc = getMainProcess(elem);
>>>>>>>
public static StringType createStringDataType() {
final StringType stringDataType = ProcessFactory.eINSTANCE.createStringType();
stringDataType.setName(DataTypeLabels.stringDataType);
return stringDataType;
}
public static DoubleType createDoubleDataType() {
final DoubleType doubleDataType = ProcessFactory.eINSTANCE.createDoubleType();
doubleDataType.setName(DataTypeLabels.doubleDataType);
return doubleDataType;
}
public static LongType createLongDataType() {
final LongType longDataType = ProcessFactory.eINSTANCE.createLongType();
longDataType.setName(DataTypeLabels.longDataType);
return longDataType;
}
public static IntegerType createIntegerDataType() {
final IntegerType intDataType = ProcessFactory.eINSTANCE.createIntegerType();
intDataType.setName(DataTypeLabels.integerDataType);
return intDataType;
}
public static DateType createDateDataType() {
final DateType dateDataType = ProcessFactory.eINSTANCE.createDateType();
dateDataType.setName(DataTypeLabels.dateDataType);
return dateDataType;
}
public static BooleanType createBooleanDataType() {
final BooleanType boolDataType = ProcessFactory.eINSTANCE.createBooleanType();
boolDataType.setName(DataTypeLabels.booleanDataType);
return boolDataType;
}
public static DataType getDataTypeForID(final EObject elem, final String name) {
final MainProcess proc = getMainProcess(elem);
<<<<<<<
for (final DataType type : proc.getDatatypes()) {
if (type.getName().equals(NamingUtils.convertToId(name))) {
return type;
=======
for (final DataType type : proc.getDatatypes()) {
if (type.getName().equals(NamingUtils.convertToId(name))) {
return type;
}
>>>>>>>
for (final DataType type : proc.getDatatypes()) {
if (type.getName().equals(NamingUtils.convertToId(name))) {
return type;
}
<<<<<<<
public static Lane getParentLane(final EObject element) {
=======
public static Document getDocumentReferencedInExpression(final Expression expr) {
final List<EObject> refs = expr.getReferencedElements();
for (final EObject ref : refs) {
if (ref instanceof Document && ((Document) ref).getName().equals(expr.getContent())) {
return (Document) ref;
}
}
return null;
}
public static Lane getParentLane(final EObject element) {
>>>>>>>
public static Document getDocumentReferencedInExpression(final Expression expr) {
final List<EObject> refs = expr.getReferencedElements();
for (final EObject ref : refs) {
if (ref instanceof Document && ((Document) ref).getName().equals(expr.getContent())) {
return (Document) ref;
}
}
return null;
}
public static Lane getParentLane(final EObject element) {
<<<<<<<
public static boolean isObjectIsReferencedInExpression(final Expression expr, final Object elementToDisplay){
for (final EObject referencedElement:expr.getReferencedElements()){
if (referencedElement instanceof Parameter && elementToDisplay instanceof Parameter && ((Parameter)referencedElement).getName().equals(((Parameter)elementToDisplay).getName())){
return true;
}
if (referencedElement instanceof SearchIndex && elementToDisplay instanceof SearchIndex && ((SearchIndex)referencedElement).getName().getName().equals(((SearchIndex)elementToDisplay).getName().getName())){
return true;
}
if (referencedElement instanceof Element && elementToDisplay instanceof Element && ((Element)referencedElement).getName().equals(((Element)elementToDisplay).getName())){
return true;
}
}
return false;
}
@SuppressWarnings("unchecked")
public static <T extends EObject> T getFirstContainerOfType(final EObject element, final Class<T> type) {
EObject current = element;
while (current != null && !type.isAssignableFrom(current.getClass())) {
current = current.eContainer();
}
return (T) current;
}
=======
public static boolean isObjectIsReferencedInExpression(final Expression expr, final Object elementToDisplay){
for (final EObject referencedElement:expr.getReferencedElements()){
if (referencedElement instanceof Parameter && elementToDisplay instanceof Parameter && ((Parameter)referencedElement).getName().equals(((Parameter)elementToDisplay).getName())){
return true;
}
if (referencedElement instanceof SearchIndex && elementToDisplay instanceof SearchIndex && ((SearchIndex)referencedElement).getName().getName().equals(((SearchIndex)elementToDisplay).getName().getName())){
return true;
}
if (referencedElement instanceof Element && elementToDisplay instanceof Element && ((Element)referencedElement).getName().equals(((Element)elementToDisplay).getName())){
return true;
}
}
return false;
}
>>>>>>>
public static boolean isObjectIsReferencedInExpression(final Expression expr, final Object elementToDisplay){
for (final EObject referencedElement:expr.getReferencedElements()){
if (referencedElement instanceof Parameter && elementToDisplay instanceof Parameter && ((Parameter)referencedElement).getName().equals(((Parameter)elementToDisplay).getName())){
return true;
}
if (referencedElement instanceof SearchIndex && elementToDisplay instanceof SearchIndex
&& ((SearchIndex) referencedElement).getName().getName().equals(((SearchIndex) elementToDisplay).getName().getName())) {
return true;
}
if (referencedElement instanceof Element && elementToDisplay instanceof Element && ((Element)referencedElement).getName().equals(((Element)elementToDisplay).getName())){
return true;
}
}
return false;
}
@SuppressWarnings("unchecked")
public static <T extends EObject> T getFirstContainerOfType(final EObject element, final Class<T> type) {
EObject current = element;
while (current != null && !type.isAssignableFrom(current.getClass())) {
current = current.eContainer();
}
return (T) current;
} |
<<<<<<<
import org.hyperic.hq.appdef.shared.AppdefEntityNotFoundException;
import org.hyperic.hq.appdef.shared.ConfigFetchException;
=======
import org.hyperic.hq.api.transfer.mapping.UnknownEndpointException;
>>>>>>>
import org.hyperic.hq.appdef.shared.AppdefEntityNotFoundException;
import org.hyperic.hq.appdef.shared.ConfigFetchException;
import org.hyperic.hq.api.transfer.mapping.UnknownEndpointException;
<<<<<<<
import org.hyperic.hq.product.PluginException;
import org.hyperic.util.config.EncodingException;
=======
import org.hyperic.hq.notifications.EndpointQueue;
import org.hyperic.hq.notifications.NotificationEndpoint;
>>>>>>>
import org.hyperic.hq.product.PluginException;
import org.hyperic.util.config.EncodingException;
import org.hyperic.hq.notifications.EndpointQueue;
import org.hyperic.hq.notifications.NotificationEndpoint;
<<<<<<<
private ResourceTransfer resourceTransfer;
// @Autowired
// private ConfigurationTransfer configurationTransfer;
=======
private ResourceTransfer resourceTransfer;
@Autowired
private EndpointQueue endpointQueue;
>>>>>>>
private ResourceTransfer resourceTransfer;
@Autowired
private EndpointQueue endpointQueue; |
<<<<<<<
=======
private String performGroovyRefactoring(final String script) {
final ProvidedGroovyRepositoryStore store = RepositoryManager.getInstance().getRepositoryStore(ProvidedGroovyRepositoryStore.class);
final GroovyFileStore tmpGroovyFileStore = store.createRepositoryFileStore("script" + System.currentTimeMillis() + ".groovy");
tmpGroovyFileStore.save(script);
final GroovyCompilationUnit compilationUnitFrom = (GroovyCompilationUnit) JavaCore.createCompilationUnitFrom(tmpGroovyFileStore.getResource());
final CompletionNodeFinder finder = new CompletionNodeFinder(0, 0, 0, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
final ContentAssistContext assistContext = finder.findContentAssistContext(compilationUnitFrom);
org.codehaus.groovy.ast.ASTNode astNode = null;
if (assistContext != null) {
astNode = assistContext.containingCodeBlock;
}
if (astNode != null) {
final ProcessVariableRenamer variableRenamer = new ProcessVariableRenamer();
final Map<String, String> variableToRename = new HashMap<String, String>();
for (final RefactorPair<Y, Z> pairToRefactor : pairsToRefactor) {
variableToRename.put(pairToRefactor.getOldValueName(), pairToRefactor.getNewValueName());
}
final MultiTextEdit rename = variableRenamer.rename(astNode, variableToRename);
if (rename.getChildrenSize() > 0) {
final Document document = new Document(script);
try {
rename.apply(document);
} catch (final MalformedTreeException e) {
BonitaStudioLog.error(e);
} catch (final BadLocationException e) {
BonitaStudioLog.error(e);
}
final String scriptRefactored = document.get();
forceDelete(compilationUnitFrom);
return scriptRefactored;
}
}
tmpGroovyFileStore.delete();
forceDelete(compilationUnitFrom);
return script;
}
protected void forceDelete(final GroovyCompilationUnit compilationUnit) {
try {
if (compilationUnit.exists()) {
compilationUnit.delete(true, new NullProgressMonitor());
}
} catch (final JavaModelException e) {
BonitaStudioLog.error(e);
}
}
>>>>>>>
private String performGroovyRefactoring(final String script) {
final ProvidedGroovyRepositoryStore store = RepositoryManager.getInstance().getRepositoryStore(ProvidedGroovyRepositoryStore.class);
final GroovyFileStore tmpGroovyFileStore = store.createRepositoryFileStore("script" + System.currentTimeMillis() + ".groovy");
tmpGroovyFileStore.save(script);
final GroovyCompilationUnit compilationUnitFrom = (GroovyCompilationUnit) JavaCore.createCompilationUnitFrom(tmpGroovyFileStore.getResource());
final CompletionNodeFinder finder = new CompletionNodeFinder(0, 0, 0, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
final ContentAssistContext assistContext = finder.findContentAssistContext(compilationUnitFrom);
org.codehaus.groovy.ast.ASTNode astNode = null;
if (assistContext != null) {
astNode = assistContext.containingCodeBlock;
}
if (astNode != null) {
final ProcessVariableRenamer variableRenamer = new ProcessVariableRenamer();
final Map<String, String> variableToRename = new HashMap<String, String>();
for (final RefactorPair<Y, Z> pairToRefactor : pairsToRefactor) {
variableToRename.put(pairToRefactor.getOldValueName(), pairToRefactor.getNewValueName());
}
final MultiTextEdit rename = variableRenamer.rename(astNode, variableToRename);
if (rename.getChildrenSize() > 0) {
final Document document = new Document(script);
try {
rename.apply(document);
} catch (final MalformedTreeException e) {
BonitaStudioLog.error(e);
} catch (final BadLocationException e) {
BonitaStudioLog.error(e);
}
final String scriptRefactored = document.get();
forceDelete(compilationUnitFrom);
return scriptRefactored;
}
}
tmpGroovyFileStore.delete();
forceDelete(compilationUnitFrom);
return script;
}
protected void forceDelete(final GroovyCompilationUnit compilationUnit) {
try {
if (compilationUnit.exists()) {
compilationUnit.delete(true, new NullProgressMonitor());
}
} catch (final JavaModelException e) {
BonitaStudioLog.error(e);
}
} |
<<<<<<<
import org.bonitasoft.studio.model.process.diagram.edit.parts.SequenceFlowNameEditPart;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.fest.assertions.Assertions;
=======
>>>>>>>
import org.bonitasoft.studio.model.process.diagram.edit.parts.SequenceFlowNameEditPart;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
<<<<<<<
@RunWith(MockitoJUnitRunner.class)
=======
>>>>>>>
@RunWith(MockitoJUnitRunner.class) |
<<<<<<<
=======
import org.bonitasoft.studio.tests.attachment.TestRunWithDocument;
import org.bonitasoft.studio.tests.data.DataWizardIT;
>>>>>>>
import org.bonitasoft.studio.tests.data.DataWizardIT; |
<<<<<<<
import org.bonitasoft.studio.swtbot.framework.expression.BotExpressionEditorDialog;
import org.bonitasoft.studio.swtbot.framework.expression.BotScriptExpressionEditor;
=======
import org.eclipse.jface.dialogs.IDialogConstants;
>>>>>>>
import org.bonitasoft.studio.swtbot.framework.expression.BotExpressionEditorDialog;
import org.bonitasoft.studio.swtbot.framework.expression.BotScriptExpressionEditor;
import org.eclipse.jface.dialogs.IDialogConstants; |
<<<<<<<
import org.physical_web.physicalweb.BeaconConfigHelper;
import org.uribeacon.beacon.UriBeacon;
=======
>>>>>>>
import org.uribeacon.beacon.UriBeacon;
<<<<<<<
private final ScanCallback mScanCallback = new ScanCallback() {
@Override
public void onScanResult(int callbackType, ScanResult scanResult) {
switch (callbackType) {
case ScanSettings.CALLBACK_TYPE_ALL_MATCHES:
handleFoundDevice(scanResult);
break;
case ScanSettings.CALLBACK_TYPE_FIRST_MATCH:
handleFoundDevice(scanResult);
break;
case ScanSettings.CALLBACK_TYPE_MATCH_LOST:
handleLostDevice(scanResult);
break;
default:
Log.e(TAG, "Unrecognized callback type constant received: " + callbackType);
}
}
@Override
public void onScanFailed(int errorCode) {
Log.d(TAG, "onScanFailed " + "errorCode: " + errorCode);
}
};
/**
* This is the class that listens
* for when the user taps the write-to-beacon button.
*/
public void onWriteToBeaconButtonClick(View view) {
// Update the status text
mStatusTextView.setText(getString(R.string.config_writing_to_beacon_text));
// Remove the focus from the url edit text field
mEditCard.clearFocus();
// Get the current text in the url edit text field.
String url = mEditCardUrl.getText().toString();
// Write the url to the device
try {
byte[] scanRecord = BeaconHelper.createAdvertisingPacket(url);
mBeaconConfig.writeUriBeacon(scanRecord);
} catch (URISyntaxException e) {
}
}
=======
>>>>>>>
/**
* This is the class that listens
* for when the user taps the write-to-beacon button.
*/
public void onWriteToBeaconButtonClick(View view) {
// Update the status text
mScanningStatus.setText(getString(R.string.config_writing_to_beacon_text));
// Remove the focus from the url edit text field
mEditCard.clearFocus();
// Get the current text in the url edit text field.
String url = mEditCardUrl.getText().toString();
// Write the url to the device
try {
byte[] scanRecord = BeaconHelper.createAdvertisingPacket(url);
mBeaconConfig.writeUriBeacon(scanRecord);
} catch (URISyntaxException e) {
}
}
<<<<<<<
@Override
public void onUriBeaconRead(byte[] scanRecord, int status) {
if (status != BluetoothGatt.GATT_SUCCESS) {
Log.e(TAG, "onUriBeaconRead - error " + status);
} else {
UriBeacon uriBeacon = UriBeacon.parseFromBytes(scanRecord);
if (uriBeacon != null) {
final String url = uriBeacon.getUriString();
Log.d(TAG, "onReadUrlComplete" + " url: " + url);
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// Update the url edit text field with the given url
mEditCardUrl.setText(url);
// Show the beacon configuration card
showConfigurableBeaconCard();
}
});
}
}
}
@Override
public void onUriBeaconWrite(final int status) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// Detach this fragment from its activity
getFragmentManager().popBackStack();
// Show a toast to the user to let them know if the Url was written or error occurred.
int msgId = (status == BluetoothGatt.GATT_SUCCESS)
? R.string.config_url_saved : R.string.config_url_error;
Toast.makeText(getActivity(), getString(msgId), Toast.LENGTH_SHORT).show();
}
});
}
=======
/**
* This is called when the user taps the write-to-beacon button.
*/
private void saveEditCardUrlToBeacon() {
// Update the status text
mScanningStatus.setText(getString(R.string.config_writing_to_beacon_text));
// Remove the focus from the url edit text field
mEditCard.clearFocus();
// Get the current text in the url edit text field.
String url = mEditCardUrl.getText().toString();
// Write the url to the device
BeaconConfigHelper.writeBeaconUrl(getActivity(), this, mNearestDevice, url);
}
>>>>>>>
@Override
public void onUriBeaconRead(byte[] scanRecord, int status) {
if (status != BluetoothGatt.GATT_SUCCESS) {
Log.e(TAG, "onUriBeaconRead - error " + status);
} else {
UriBeacon uriBeacon = UriBeacon.parseFromBytes(scanRecord);
if (uriBeacon != null) {
final String url = uriBeacon.getUriString();
Log.d(TAG, "onReadUrlComplete" + " url: " + url);
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// Update the url edit text field with the given url
mEditCardUrl.setText(url);
// Show the beacon configuration card
showConfigurableBeaconCard();
}
});
}
}
}
@Override
public void onUriBeaconWrite(final int status) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// Detach this fragment from its activity
getFragmentManager().popBackStack();
// Show a toast to the user to let them know if the Url was written or error occurred.
int msgId = (status == BluetoothGatt.GATT_SUCCESS)
? R.string.config_url_saved : R.string.config_url_error;
Toast.makeText(getActivity(), getString(msgId), Toast.LENGTH_SHORT).show();
}
});
}
/**
* This is called when the user taps the write-to-beacon button.
*/
private void saveEditCardUrlToBeacon() {
// Update the status text
mScanningStatus.setText(getString(R.string.config_writing_to_beacon_text));
// Remove the focus from the url edit text field
mEditCard.clearFocus();
// Get the current text in the url edit text field.
String url = mEditCardUrl.getText().toString();
// Write the url to the device
try {
byte[] scanResult = BeaconHelper.createAdvertisingPacket(url);
mBeaconConfig.writeUriBeacon(scanResult);
} catch (URISyntaxException e) {
e.printStackTrace();
}
} |
<<<<<<<
Iterable<byte[]> keys = new IndexIterable(indice);
Iterable<KeyValue<T>> results = mgr.findAllImpl2(mainMetaClass, keys, meta.getQuery(), batchSize);
=======
Iterable<byte[]> keys = new IterableIndex(indice);
Iterable<KeyValue<T>> results = mgr.findAllImpl2(metaClass, keys, meta.getQuery(), batchSize);
>>>>>>>
Iterable<byte[]> keys = new IterableIndex(indice);
Iterable<KeyValue<T>> results = mgr.findAllImpl2(mainMetaClass, keys, meta.getQuery(), batchSize); |
<<<<<<<
bindings.addBehaviourMap( "store", storeController.getBehaviourMap() );
bindings.addInputTriggerMap( "store", storeController.getInputTriggerMap() );
bdv.getViewerFrame().setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
// TODO I hate this, but we need to prevent the ViewerFrame's
// listener from calling stop on the viewer
WindowListener[] listeners = bdv.getViewerFrame().getWindowListeners();
for ( WindowListener wl : listeners )
bdv.getViewerFrame().removeWindowListener( wl );
=======
bdv.getViewerFrame().setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
// TODO I hate this, but we need to prevent the ViewerFrame's
// listener from calling stop on the viewer
final WindowListener[] listeners = bdv.getViewerFrame().getWindowListeners();
for ( final WindowListener wl : listeners )
bdv.getViewerFrame().removeWindowListener( wl );
>>>>>>>
bindings.addBehaviourMap( "store", storeController.getBehaviourMap() );
bindings.addInputTriggerMap( "store", storeController.getInputTriggerMap() );
bdv.getViewerFrame().setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
// TODO I hate this, but we need to prevent the ViewerFrame's
// listener from calling stop on the viewer
final WindowListener[] listeners = bdv.getViewerFrame().getWindowListeners();
for ( final WindowListener wl : listeners )
bdv.getViewerFrame().removeWindowListener( wl );
<<<<<<<
boolean reallyClose = saveBeforeClosing( params );
if( reallyClose )
{
bdv.getViewerFrame().getViewerPanel().stop();
bdv.getViewerFrame().setVisible( false );
// TODO really shouldn't kill the whole jvm in case some other process (e.g. fiji eventually) calls bigcat
System.exit( 0 );
}
=======
final boolean reallyClose = saveBeforeClosing( params );
if( reallyClose )
{
bdv.getViewerFrame().getViewerPanel().stop();
bdv.getViewerFrame().setVisible( false );
// TODO really shouldn't kill the whole jvm in case some other process (e.g. fiji eventually) calls bigcat
System.exit( 0 );
}
>>>>>>>
final boolean reallyClose = saveBeforeClosing( params );
if( reallyClose )
{
bdv.getViewerFrame().getViewerPanel().stop();
bdv.getViewerFrame().setVisible( false );
// TODO really shouldn't kill the whole jvm in case some other process (e.g. fiji eventually) calls bigcat
System.exit( 0 );
}
<<<<<<<
int option = JOptionPane.showConfirmDialog(
bdv.getViewerFrame(),
message,
bdv.getViewerFrame().getTitle(),
JOptionPane.YES_NO_CANCEL_OPTION );
boolean save = option == JOptionPane.YES_OPTION;
boolean reallyClose = save || option == JOptionPane.NO_OPTION;
if ( save )
=======
final int option = JOptionPane.showConfirmDialog(
bdv.getViewerFrame(),
message,
bdv.getViewerFrame().getTitle(),
JOptionPane.YES_NO_CANCEL_OPTION );
final boolean save = option == JOptionPane.YES_OPTION;
final boolean reallyClose = save || option == JOptionPane.NO_OPTION;
if ( save )
>>>>>>>
final int option = JOptionPane.showConfirmDialog(
bdv.getViewerFrame(),
message,
bdv.getViewerFrame().getTitle(),
JOptionPane.YES_NO_CANCEL_OPTION );
final boolean save = option == JOptionPane.YES_OPTION;
final boolean reallyClose = save || option == JOptionPane.NO_OPTION;
if ( save ) |
<<<<<<<
=======
import net.imglib2.cache.Cache;
import net.imglib2.cache.CacheLoader;
import net.imglib2.cache.Invalidate;
>>>>>>>
import net.imglib2.cache.Cache;
import net.imglib2.cache.CacheLoader;
import net.imglib2.cache.Invalidate;
<<<<<<<
import net.imglib2.util.ValuePair;
import org.janelia.saalfeldlab.fx.ObservableWithListenersList;
import org.janelia.saalfeldlab.fx.util.InvokeOnJavaFXApplicationThread;
import org.janelia.saalfeldlab.labels.blocks.LabelBlockLookup;
import org.janelia.saalfeldlab.labels.blocks.n5.LabelBlockLookupFromN5;
import org.janelia.saalfeldlab.paintera.cache.Invalidate;
import org.janelia.saalfeldlab.paintera.cache.InvalidateAll;
import org.janelia.saalfeldlab.paintera.cache.global.GlobalCache;
import org.janelia.saalfeldlab.paintera.config.Viewer3DConfig;
=======
>>>>>>>
<<<<<<<
Stream.of(this.blockListCacheInvalidate).forEach(InvalidateAll::invalidateAll);
Stream.of(this.meshCacheInvalidate).forEach(InvalidateAll::invalidateAll);
if (labelBlockLookup instanceof LabelBlockLookupFromN5)
((LabelBlockLookupFromN5) labelBlockLookup).invalidateCache();
=======
Stream.of(this.invalidateMeshCaches).forEach(Invalidate::invalidateAll);
>>>>>>>
Stream.of(this.blockListCacheInvalidate).forEach(InvalidateAll::invalidateAll);
Stream.of(this.meshCacheInvalidate).forEach(InvalidateAll::invalidateAll);
if (labelBlockLookup instanceof LabelBlockLookupFromN5)
((LabelBlockLookupFromN5) labelBlockLookup).invalidateCache();
<<<<<<<
final ObjectProperty<ViewFrustum> viewFrustumProperty,
final ObjectProperty<AffineTransform3D> eyeToWorldTransformProperty,
final LabelBlockLookup labelBlockLookup,
final GlobalCache globalCache,
=======
final InterruptibleFunction<Long, Interval[]>[] backgroundBlockCaches,
final Function<CacheLoader<ShapeKey<TLongHashSet>, Pair<float[], float[]>>, Cache<ShapeKey<TLongHashSet>, Pair<float[], float[]>>> makeCache,
>>>>>>>
final ObjectProperty<ViewFrustum> viewFrustumProperty,
final ObjectProperty<AffineTransform3D> eyeToWorldTransformProperty,
final LabelBlockLookup labelBlockLookup,
final GlobalCache globalCache,
<<<<<<<
final Pair<InterruptibleFunctionAndCache<ShapeKey<TLongHashSet>, Pair<float[], float[]>>, Invalidate<ShapeKey<TLongHashSet>>>[] meshCachesAndInvalidate = CacheUtils
=======
final InterruptibleFunctionAndCache<ShapeKey<TLongHashSet>, Pair<float[], float[]>>[] meshCaches = CacheUtils
>>>>>>>
final Pair<InterruptibleFunctionAndCache<ShapeKey<TLongHashSet>, Pair<float[], float[]>>, Invalidate<ShapeKey<TLongHashSet>>>[] meshCachesAndInvalidate = CacheUtils
<<<<<<<
labelBlockLookup,
blockCachesAndInvalidate,
meshCachesAndInvalidate,
=======
delegateBlockCaches,
meshCaches,
meshCaches,
>>>>>>>
labelBlockLookup,
blockCachesAndInvalidate,
meshCachesAndInvalidate,
<<<<<<<
meshWorkersExecutors
);
=======
meshWorkersExecutors);
manager.addRefreshMeshesListener(() -> {
LOG.debug("Refreshing meshes!");
Stream.of(meshCaches).forEach(Invalidate::invalidateAll);
final long[] selection = selectedSegments.getSelectedIds().getActiveIds();
final long lastSelection = selectedSegments.getSelectedIds().getLastSelection();
selectedSegments.getSelectedIds().deactivateAll();
selectedSegments.getSelectedIds().activate(selection);
selectedSegments.getSelectedIds().activateAlso(lastSelection);
});
>>>>>>>
meshWorkersExecutors
); |
<<<<<<<
import java.lang.reflect.Type;
import java.util.Optional;
import org.janelia.saalfeldlab.paintera.meshes.MeshSettings;
import org.janelia.saalfeldlab.paintera.serialization.PainteraSerialization;
import org.scijava.plugin.Plugin;
=======
>>>>>>>
import java.lang.reflect.Type;
import java.util.Optional;
import org.janelia.saalfeldlab.paintera.meshes.MeshSettings;
import org.janelia.saalfeldlab.paintera.serialization.PainteraSerialization;
import org.scijava.plugin.Plugin;
<<<<<<<
=======
>>>>>>>
<<<<<<<
map.addProperty(LEVEL_OF_DETAIL_KEY, src.levelOfDetailProperty().get());
map.addProperty(COARSEST_SCALE_LEVEL_KEY, src.coarsestScaleLevelProperty().get());
map.addProperty(FINEST_SCALE_LEVEL_KEY, src.finestScaleLevelProperty().get());
map.addProperty(SIMPLIFICATION_ITERATIONS_KEY, src.simplificationIterationsProperty().get());
map.addProperty(SMOOTHING_LAMBDA_KEY, src.smoothingLambdaProperty().get());
map.addProperty(SMOOTHING_ITERATIONS_KEY, src.smoothingIterationsProperty().get());
map.addProperty(MIN_LABEL_RATIO_KEY, src.minLabelRatioProperty().get());
map.addProperty(OPACITY_KEY, src.opacityProperty().get());
map.addProperty(INFLATE_KEY, src.inflateProperty().get());
map.addProperty(IS_VISIBLE_KEY, src.isVisibleProperty().get());
map.add(DRAW_MODE_KEY, context.serialize(src.drawModeProperty().get()));
map.add(CULL_FACE_KEY, context.serialize(src.cullFaceProperty().get()));
=======
if (src.scaleLevelProperty().get() != src.numScaleLevels() - 1)
map.addProperty(SCALE_LEVEL_KEY, src.scaleLevelProperty().get());
if (MeshSettings.DEFAULT_MESH_SIMPLIFICATION_ITERATIONS != src.simplificationIterationsProperty().get())
map.addProperty(SIMPLIFCIATION_ITERATIONS_KEY, src.simplificationIterationsProperty().get());
if (MeshSettings.DEFAULT_MESH_SMOOTHING_LAMBDA != src.smoothingLambdaProperty().get())
map.addProperty(SMOOTHING_LAMBDA_KEY, src.smoothingLambdaProperty().get());
if (MeshSettings.DEFAULT_MESH_SMOOTHING_ITERATIONS != src.smoothingIterationsProperty().get())
map.addProperty(SMOOTHING_ITERATIONS_KEY, src.smoothingIterationsProperty().get());
if (MeshSettings.DEFAULT_MESH_OPACITY != src.opacityProperty().get())
map.addProperty(OPACITY_KEY, src.opacityProperty().get());
if (MeshSettings.DEFAULT_MESH_INFLATE != src.inflateProperty().get())
map.addProperty(INFLATE_KEY, src.inflateProperty().get());
if (MeshSettings.DEFAULT_MESH_IS_VISIBLE!= src.isVisibleProperty().get())
map.addProperty(IS_VISIBLE_KEY, src.isVisibleProperty().get());
if (MeshSettings.DEFAULT_MESH_DRAWMODE != src.drawModeProperty().get())
map.add(DRAW_MODE_KEY, context.serialize(src.drawModeProperty().get()));
if (MeshSettings.DEFAULT_MESH_CULLFACE != src.cullFaceProperty().get())
map.add(CULL_FACE_KEY, context.serialize(src.cullFaceProperty().get()));
>>>>>>>
if (MeshSettings.DEFAULT_LEVEL_OF_DETAIL != src.levelOfDetailProperty().get())
map.addProperty(LEVEL_OF_DETAIL_KEY, src.levelOfDetailProperty().get());
if (MeshSettings.getDefaultCoarsestScaleLevel(src.numScaleLevels()) != src.coarsestScaleLevelProperty().get())
map.addProperty(COARSEST_SCALE_LEVEL_KEY, src.coarsestScaleLevelProperty().get());
if (MeshSettings.getDefaultFinestScaleLevel(src.numScaleLevels()) != src.finestScaleLevelProperty().get())
map.addProperty(FINEST_SCALE_LEVEL_KEY, src.finestScaleLevelProperty().get());
if (MeshSettings.DEFAULT_MESH_SIMPLIFICATION_ITERATIONS != src.simplificationIterationsProperty().get())
map.addProperty(SIMPLIFICATION_ITERATIONS_KEY, src.simplificationIterationsProperty().get());
if (MeshSettings.DEFAULT_MESH_SMOOTHING_LAMBDA != src.smoothingLambdaProperty().get())
map.addProperty(SMOOTHING_LAMBDA_KEY, src.smoothingLambdaProperty().get());
if (MeshSettings.DEFAULT_MESH_SMOOTHING_ITERATIONS != src.smoothingIterationsProperty().get())
map.addProperty(SMOOTHING_ITERATIONS_KEY, src.smoothingIterationsProperty().get());
if (MeshSettings.DEFAULT_MIN_LABEL_RATIO != src.minLabelRatioProperty().get())
map.addProperty(MIN_LABEL_RATIO_KEY, src.minLabelRatioProperty().get());
if (MeshSettings.DEFAULT_MESH_OPACITY != src.opacityProperty().get())
map.addProperty(OPACITY_KEY, src.opacityProperty().get());
if (MeshSettings.DEFAULT_MESH_INFLATE != src.inflateProperty().get())
map.addProperty(INFLATE_KEY, src.inflateProperty().get());
if (MeshSettings.DEFAULT_MESH_IS_VISIBLE!= src.isVisibleProperty().get())
map.addProperty(IS_VISIBLE_KEY, src.isVisibleProperty().get());
if (MeshSettings.DEFAULT_MESH_DRAWMODE != src.drawModeProperty().get())
map.add(DRAW_MODE_KEY, context.serialize(src.drawModeProperty().get()));
if (MeshSettings.DEFAULT_MESH_CULLFACE != src.cullFaceProperty().get())
map.add(CULL_FACE_KEY, context.serialize(src.cullFaceProperty().get())); |
<<<<<<<
public class MainActivity extends BaseActivity {
=======
public class MainActivity extends BaseActivity {
>>>>>>>
public class MainActivity extends BaseActivity {
<<<<<<<
private BGABadgeLinearLayout meIconView;
=======
private static int notificationLength;
private NotificationService notificationService;
private ServiceConnection serviceConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
NotificationService.MyBinder binder = (NotificationService.MyBinder) service;
notificationService = binder.getService();
notificationService.getNotification();
}
@Override
public void onServiceDisconnected(ComponentName name) {
}
};
>>>>>>>
private BGABadgeLinearLayout meIconView;
<<<<<<<
=======
setupTabView();
Intent bindIntent = new Intent(MainActivity.this, NotificationService.class);
bindService(bindIntent, serviceConnection, BIND_AUTO_CREATE);
}
@Override
protected void onResume() {
super.onResume();
>>>>>>>
setupTabView();
<<<<<<<
@Subscribe public void onNotificationChange(NotificationChangeEvent event) {
int lenght = event.getNotificationLength();
if (lenght > 0) {
meIconView.showTextBadge(String.valueOf(lenght));
} else {
meIconView.hiddenBadge();
}
}
=======
@Subscribe public void onNotificationChangeMe(NotificationChangeEvent event) {
BGABadgeLinearLayout meIconView = (BGABadgeLinearLayout) viewpagerTab.getTabAt(3).findViewById(R.id.badgeView);
meIconView.showTextBadge(event.getNotificationLenght());
}
>>>>>>>
@Subscribe public void onNotificationChangeMe(NotificationChangeEvent event) {
meIconView = (BGABadgeLinearLayout) viewpagerTab.getTabAt(3).findViewById(R.id.badgeView);
int lenght = event.getNotificationLength();
if (lenght > 0) {
meIconView.showTextBadge(String.valueOf(lenght));
} else {
meIconView.hiddenBadge();
}
} |
<<<<<<<
=======
final InterruptibleFunction<Long, Interval[]>[] blockLoaders = IntStream
.range(0, source.getNumMipmapLevels())
.mapToObj(level -> InterruptibleFunction.fromFunction( ThrowingFunction.unchecked((ThrowingFunction<Long, Interval[], Exception>) id -> lookup.read(new LabelBlockLookupKey(level, id)))))
.toArray(InterruptibleFunction[]::new);
>>>>>>> |
<<<<<<<
=======
import eu.unicate.retroauth.annotations.Authenticated;
import eu.unicate.retroauth.annotations.Authentication;
import retrofit.http.Body;
>>>>>>>
import retrofit.http.Body; |
<<<<<<<
import com.google.gson.JsonIOException;
import com.google.gson.JsonSyntaxException;
import bdv.util.BlockedInterval;
import bdv.util.dvid.DatasetBlk;
import bdv.util.dvid.DatasetBlkLabel;
import bdv.util.dvid.Node;
import bdv.util.dvid.Repository;
=======
>>>>>>>
import com.google.gson.JsonIOException;
import com.google.gson.JsonSyntaxException;
import bdv.util.BlockedInterval;
import bdv.util.dvid.DatasetBlk;
import bdv.util.dvid.DatasetBlkLabel;
import bdv.util.dvid.Node;
import bdv.util.dvid.Repository;
<<<<<<<
public DvidLabels64Writer( String url, String uuid, String dataSet )
=======
public DvidLabels64Writer( final String apiUrl, final String uuid, final String dataSet )
>>>>>>>
public DvidLabels64Writer( final String url, final String uuid, final String dataSet )
<<<<<<<
public DvidLabels64Writer( String url, String uuid, final String dataSetName, final int[] blockSize )
=======
public DvidLabels64Writer( final String apiUrl, final String uuid, final String dataSet, final int blockSize )
>>>>>>>
public DvidLabels64Writer( final String url, final String uuid, final String dataSet, final int[] blockSize )
<<<<<<<
public static int[] adaptToBlockSize( int[] input, final int[]blockSize )
=======
public static int[] adaptToBlockSize( final int[] input, final int blockSize )
>>>>>>>
public static int[] adaptToBlockSize( final int[] input, final int[] blockSize )
<<<<<<<
int bs = blockSize[ d ];
int mod = val % bs;
=======
final int mod = val % blockSize;
>>>>>>>
int bs = blockSize[ d ];
int mod = val % bs;
<<<<<<<
public static long[] adaptToBlockSize( long[] input, final int[] blockSize )
=======
public static long[] adaptToBlockSize( final long[] input, final int blockSize )
>>>>>>>
public static long[] adaptToBlockSize( final long[] input, final int[] blockSize )
<<<<<<<
int bs = blockSize[d];
long mod = val % bs;
=======
final long mod = val % blockSize;
>>>>>>>
int bs = blockSize[d];
long mod = val % bs;
<<<<<<<
String url = "http://vm570.int.janelia.org:8080";
String uuid = "9c7cc44aa0544d33905ce82d153e2544";
String dataSet = "bigcat-test2";
Repository repo = new Repository( url, uuid );
=======
final String apiUrl = "http://vm570.int.janelia.org:8080/api";
final String uuid = "9c7cc44aa0544d33905ce82d153e2544";
final String dataSet = "bigcat-test2";
>>>>>>>
final String url = "http://vm570.int.janelia.org:8080";
final String uuid = "9c7cc44aa0544d33905ce82d153e2544";
final String dataSet = "bigcat-test2";
Repository repo = new Repository( url, uuid );
<<<<<<<
DvidLabels64Writer writer = new DvidLabels64Writer( url, uuid, dataSet );
int[] steps = new int[] { 200, 200, 32 };
int[] offset = new int[] { 0, 0, 0 };
Converter< FloatType, UnsignedLongType > converter = new Converter< FloatType, UnsignedLongType >()
=======
int numPixels = 1;
for ( int d = 0; d < dim.length; ++d )
numPixels *= dim[ d ];
final DvidLabels64Writer writer = new DvidLabels64Writer( apiUrl, uuid, dataSet, 32 );
final int[] steps = new int[] { 200, 200, 32 };
final int[] offset = new int[] { 0, 0, 0 };
final Converter< FloatType, UnsignedLongType > converter = new Converter< FloatType, UnsignedLongType >()
>>>>>>>
DvidLabels64Writer writer = new DvidLabels64Writer( url, uuid, dataSet );
int[] steps = new int[] { 200, 200, 32 };
int[] offset = new int[] { 0, 0, 0 };
Converter< FloatType, UnsignedLongType > converter = new Converter< FloatType, UnsignedLongType >() |
<<<<<<<
import javafx.beans.property.SimpleIntegerProperty;
=======
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.paint.Color;
import javafx.scene.transform.Affine;
import org.janelia.saalfeldlab.paintera.viewer3d.Viewer3DFX;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
>>>>>>>
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.paint.Color;
import javafx.scene.transform.Affine;
<<<<<<<
private final SimpleBooleanProperty showBlockBoundaries = new SimpleBooleanProperty(false);
private final SimpleIntegerProperty rendererBlockSize = new SimpleIntegerProperty(64);
public BooleanProperty areMeshesEnabledProperty()
=======
private final SimpleObjectProperty<Color> backgroundColor = new SimpleObjectProperty<>(Color.BLACK);
private final Affine affine = new Affine();
// TODO this is only necessary while projects without serialized transform exist
private boolean wasAffineSet = false;
public BooleanProperty areMeshesEnabledProperty()
>>>>>>>
private final SimpleBooleanProperty showBlockBoundaries = new SimpleBooleanProperty(false);
private final SimpleObjectProperty<Color> backgroundColor = new SimpleObjectProperty<>(Color.BLACK);
private final Affine affine = new Affine();
// TODO this is only necessary while projects without serialized transform exist
private boolean wasAffineSet = false;
private final SimpleIntegerProperty rendererBlockSize = new SimpleIntegerProperty(64);
public BooleanProperty areMeshesEnabledProperty()
<<<<<<<
public BooleanProperty showBlockBoundariesProperty()
{
return this.showBlockBoundaries;
}
public IntegerProperty rendererBlockSizeProperty()
{
return this.rendererBlockSize;
}
=======
public SimpleObjectProperty<Color> backgroundColorProperty() {
return backgroundColor;
}
>>>>>>>
public BooleanProperty showBlockBoundariesProperty()
{
return this.showBlockBoundaries;
}
public IntegerProperty rendererBlockSizeProperty()
{
return this.rendererBlockSize;
}
public SimpleObjectProperty<Color> backgroundColorProperty() {
return backgroundColor;
}
<<<<<<<
viewer.showBlockBoundariesProperty().bind(this.showBlockBoundaries);
viewer.rendererBlockSizeProperty().bind(this.rendererBlockSize);
=======
final Affine affineCopy = this.affine.clone();
final boolean wasAffineSet = this.wasAffineSet;
viewer.addAffineListener(this::setAffine);
viewer.backgroundFillProperty().bindBidirectional(this.backgroundColor);
if (wasAffineSet) {
LOG.debug("Setting viewer affine to {}", affineCopy);
viewer.setAffine(affineCopy);
}
}
public boolean isWasAffineSet() {
return wasAffineSet;
>>>>>>>
viewer.showBlockBoundariesProperty().bind(this.showBlockBoundaries);
viewer.rendererBlockSizeProperty().bind(this.rendererBlockSize);
final Affine affineCopy = this.affine.clone();
final boolean wasAffineSet = this.wasAffineSet;
viewer.addAffineListener(this::setAffine);
viewer.backgroundFillProperty().bindBidirectional(this.backgroundColor);
if (wasAffineSet) {
LOG.debug("Setting viewer affine to {}", affineCopy);
viewer.setAffine(affineCopy);
}
}
public boolean isWasAffineSet() {
return wasAffineSet;
<<<<<<<
this.showBlockBoundaries.set(that.showBlockBoundaries.get());
this.rendererBlockSize.set(that.rendererBlockSize.get());
=======
this.backgroundColor.set(that.backgroundColor.get());
if (that.wasAffineSet)
setAffine(that.affine);
}
public void setAffine(final Affine affine) {
LOG.debug("Set affine {} to {}", this.affine, affine);
this.affine.setToTransform(affine);
this.wasAffineSet = true;
}
public Affine getAffineCopy() {
return this.affine.clone();
>>>>>>>
this.showBlockBoundaries.set(that.showBlockBoundaries.get());
this.rendererBlockSize.set(that.rendererBlockSize.get());
this.backgroundColor.set(that.backgroundColor.get());
if (that.wasAffineSet)
setAffine(that.affine);
}
public void setAffine(final Affine affine) {
LOG.debug("Set affine {} to {}", this.affine, affine);
this.affine.setToTransform(affine);
this.wasAffineSet = true;
}
public Affine getAffineCopy() {
return this.affine.clone(); |
<<<<<<<
import org.janelia.saalfeldlab.fx.ObservableWithListenersList;
import org.janelia.saalfeldlab.fx.util.InvokeOnJavaFXApplicationThread;
import org.janelia.saalfeldlab.labels.Label;
import org.janelia.saalfeldlab.paintera.cache.Invalidate;
import org.janelia.saalfeldlab.paintera.cache.InvalidateAll;
import org.janelia.saalfeldlab.paintera.control.assignment.FragmentSegmentAssignmentState;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedIds;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedSegments;
import org.janelia.saalfeldlab.paintera.data.DataSource;
import org.janelia.saalfeldlab.paintera.data.mask.MaskedSource;
import org.janelia.saalfeldlab.paintera.meshes.cache.BlocksForLabelDelegate;
import org.janelia.saalfeldlab.paintera.meshes.cache.CacheUtils;
import org.janelia.saalfeldlab.paintera.meshes.cache.SegmentMaskGenerators;
import org.janelia.saalfeldlab.paintera.stream.AbstractHighlightingARGBStream;
import org.janelia.saalfeldlab.paintera.viewer3d.LatestTaskExecutor;
import org.janelia.saalfeldlab.paintera.viewer3d.ViewFrustum;
import org.janelia.saalfeldlab.util.HashWrapper;
import org.janelia.saalfeldlab.util.NamedThreadFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
=======
import org.janelia.saalfeldlab.paintera.cache.Invalidate;
import org.janelia.saalfeldlab.paintera.cache.InvalidateAll;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedSegments;
import org.janelia.saalfeldlab.paintera.data.DataSource;
import org.janelia.saalfeldlab.paintera.data.mask.MaskedSource;
import org.janelia.saalfeldlab.paintera.meshes.cache.BlocksForLabelDelegate;
import org.janelia.saalfeldlab.paintera.meshes.cache.CacheUtils;
import org.janelia.saalfeldlab.paintera.meshes.cache.SegmentMaskGenerators;
import org.janelia.saalfeldlab.paintera.stream.AbstractHighlightingARGBStream;
import org.janelia.saalfeldlab.util.HashWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
import org.janelia.saalfeldlab.fx.ObservableWithListenersList;
import org.janelia.saalfeldlab.fx.util.InvokeOnJavaFXApplicationThread;
import org.janelia.saalfeldlab.labels.Label;
import org.janelia.saalfeldlab.paintera.cache.Invalidate;
import org.janelia.saalfeldlab.paintera.cache.InvalidateAll;
import org.janelia.saalfeldlab.paintera.control.assignment.FragmentSegmentAssignmentState;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedSegments;
import org.janelia.saalfeldlab.paintera.data.DataSource;
import org.janelia.saalfeldlab.paintera.data.mask.MaskedSource;
import org.janelia.saalfeldlab.paintera.meshes.cache.BlocksForLabelDelegate;
import org.janelia.saalfeldlab.paintera.meshes.cache.CacheUtils;
import org.janelia.saalfeldlab.paintera.meshes.cache.SegmentMaskGenerators;
import org.janelia.saalfeldlab.paintera.stream.AbstractHighlightingARGBStream;
import org.janelia.saalfeldlab.paintera.viewer3d.LatestTaskExecutor;
import org.janelia.saalfeldlab.paintera.viewer3d.ViewFrustum;
import org.janelia.saalfeldlab.util.HashWrapper;
import org.janelia.saalfeldlab.util.NamedThreadFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<<<<<<<
private final SelectedSegments selectedSegments;
=======
>>>>>>>
private final SelectedSegments selectedSegments;
<<<<<<<
this.viewFrustumProperty = viewFrustumProperty;
this.eyeToWorldTransformProperty = eyeToWorldTransformProperty;
this.assignment = assignment;
=======
>>>>>>>
this.viewFrustumProperty = viewFrustumProperty;
this.eyeToWorldTransformProperty = eyeToWorldTransformProperty;
this.assignment = assignment;
<<<<<<<
final long segment = neuron.getKey();
final TLongHashSet fragmentsInSegment = assignment.getFragments(segment);
final boolean isSelected = selectedSegmentsSet.contains(segment);
final boolean isConsistent = neuron.getValue().getId().equals(fragmentsInSegment);
LOG.debug("Fragments in segment {}: {}", segment, fragmentsInSegment);
LOG.debug("Segment {} is selected? {} Is consistent? {}", neuron.getKey(), isSelected, isConsistent);
if (!isSelected || !isConsistent)
toBeRemoved.add(neuron);
}
toBeRemoved.stream().map(e -> e.getValue()).forEach(this::removeMesh);
LOG.debug("Selection {}", selectedSegments);
LOG.debug("To be removed {}", toBeRemoved);
Arrays
.stream(selectedSegments)
.filter(id -> Label.regular(id))
.forEach(this::generateMesh);
if (stateChangeNeeded)
{
bulkUpdate.set(false);
stateChanged();
=======
final long[] selectedSegments = this.selectedSegments.getSelectedSegments();
final Set<Long> currentlyShowing = new HashSet<>();
final List<Entry<Long, MeshGenerator<TLongHashSet>>> toBeRemoved = new ArrayList<>();
neurons.keySet().forEach(currentlyShowing::add);
for (final Entry<Long, MeshGenerator<TLongHashSet>> neuron : neurons.entrySet())
{
final long segment = neuron.getKey();
final TLongHashSet fragmentsInSegment = this.selectedSegments.getAssignment().getFragments(segment);
final boolean isSelected = this.selectedSegments.isSegmentSelected(segment);
final boolean isConsistent = neuron.getValue().getId().equals(fragmentsInSegment);
LOG.debug("Fragments in segment {}: {}", segment, fragmentsInSegment);
LOG.debug("Segment {} is selected? {} Is consistent? {}", neuron.getKey(), isSelected, isConsistent);
if (!isSelected || !isConsistent)
{
currentlyShowing.remove(segment);
toBeRemoved.add(neuron);
}
}
toBeRemoved.stream().map(e -> e.getValue()).forEach(this::removeMesh);
LOG.debug("Currently showing {} ", currentlyShowing);
LOG.debug("Selection {}", selectedSegments);
LOG.debug("To be removed {}", toBeRemoved);
Arrays
.stream(selectedSegments)
.filter(id -> !currentlyShowing.contains(id))
.forEach(this::generateMesh);
>>>>>>>
final long segment = neuron.getKey();
final TLongHashSet fragmentsInSegment = assignment.getFragments(segment);
final boolean isSelected = selectedSegmentsSet.contains(segment);
final boolean isConsistent = neuron.getValue().getId().equals(fragmentsInSegment);
LOG.debug("Fragments in segment {}: {}", segment, fragmentsInSegment);
LOG.debug("Segment {} is selected? {} Is consistent? {}", neuron.getKey(), isSelected, isConsistent);
if (!isSelected || !isConsistent)
toBeRemoved.add(neuron);
}
toBeRemoved.stream().map(e -> e.getValue()).forEach(this::removeMesh);
LOG.debug("Selection {}", selectedSegments);
LOG.debug("To be removed {}", toBeRemoved);
Arrays
.stream(selectedSegments)
.filter(id -> Label.regular(id))
.forEach(this::generateMesh);
if (stateChangeNeeded)
{
bulkUpdate.set(false);
stateChanged();
<<<<<<<
final DataSource<D, ?> dataSource,
final SelectedIds selectedIds,
final FragmentSegmentAssignmentState assignment,
=======
final DataSource<D, ?> dataSource,
final SelectedSegments selectedSegments,
>>>>>>>
final DataSource<D, ?> dataSource,
final SelectedSegments selectedSegments, |
<<<<<<<
import org.janelia.saalfeldlab.fx.ui.NumberField;
import org.janelia.saalfeldlab.fx.ui.ObjectField.SubmitOn;
import org.janelia.saalfeldlab.util.fx.UIUtils;
import javafx.beans.property.IntegerProperty;
import javafx.geometry.HPos;
=======
import javafx.geometry.Insets;
>>>>>>>
import org.janelia.saalfeldlab.fx.Labels;
import org.janelia.saalfeldlab.fx.ui.NumberField;
import org.janelia.saalfeldlab.fx.ui.ObjectField.SubmitOn;
import org.janelia.saalfeldlab.util.fx.UIUtils;
import javafx.beans.property.IntegerProperty;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
<<<<<<<
import javafx.scene.control.Control;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
=======
import javafx.scene.control.ColorPicker;
import javafx.scene.control.Label;
>>>>>>>
import javafx.scene.control.ColorPicker;
import javafx.scene.control.Control;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
<<<<<<<
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
=======
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
import javafx.scene.paint.Color;
import org.janelia.saalfeldlab.fx.Labels;
>>>>>>>
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
import javafx.scene.paint.Color;
<<<<<<<
private final TitledPane contents;
=======
private static final double PREF_CELL_WIDTH = 50.0;
private final TitledPane contents = new TitledPane("3D Viewer", null);
>>>>>>>
private static final double PREF_CELL_WIDTH = 50.0;
private final TitledPane contents;
<<<<<<<
private final CheckBox showBlockBoundariesCheckBox = new CheckBox();
private final NumberField<IntegerProperty> rendererBlockSizeField;
=======
private final ColorPicker backgroundColorPicker = new ColorPicker(Color.BLACK);
>>>>>>>
private final CheckBox showBlockBoundariesCheckBox = new CheckBox();
private final NumberField<IntegerProperty> rendererBlockSizeField;
private final ColorPicker backgroundColorPicker = new ColorPicker(Color.BLACK);
<<<<<<<
=======
contents.collapsibleProperty().bind(areMeshesEnabledCheckBox.selectedProperty());
final GridPane settingsGrid = new GridPane();
final Label backgroundColorLabel = Labels.withTooltip("Background", "Set background color of 3D viewer.");
settingsGrid.add(backgroundColorLabel, 0, 0);
settingsGrid.add(backgroundColorPicker, 1, 0);
settingsGrid.setPadding(Insets.EMPTY);
GridPane.setHgrow(backgroundColorLabel, Priority.ALWAYS);
backgroundColorPicker.setPrefWidth(PREF_CELL_WIDTH);
contents.setPadding(Insets.EMPTY);
contents.setContent(settingsGrid);
>>>>>>>
contents.collapsibleProperty().bind(areMeshesEnabledCheckBox.selectedProperty());
contents.setPadding(Insets.EMPTY);
<<<<<<<
areMeshesEnabledCheckBox.selectedProperty().bindBidirectional(config.areMeshesEnabledProperty());
showBlockBoundariesCheckBox.selectedProperty().bindBidirectional(config.showBlockBoundariesProperty());
rendererBlockSizeField.valueProperty().bindBidirectional(config.rendererBlockSizeProperty());
=======
areMeshesEnabledCheckBox.selectedProperty().bindBidirectional(config.areMeshesEnabledProperty());
backgroundColorPicker.valueProperty().bindBidirectional(config.backgroundColorProperty());
>>>>>>>
areMeshesEnabledCheckBox.selectedProperty().bindBidirectional(config.areMeshesEnabledProperty());
showBlockBoundariesCheckBox.selectedProperty().bindBidirectional(config.showBlockBoundariesProperty());
rendererBlockSizeField.valueProperty().bindBidirectional(config.rendererBlockSizeProperty());
backgroundColorPicker.valueProperty().bindBidirectional(config.backgroundColorProperty()); |
<<<<<<<
import net.imglib2.converter.ARGBColorConverter.InvertingImp1;
import net.imglib2.converter.ARGBCompositeColorConverter;
=======
>>>>>>>
<<<<<<<
import org.janelia.saalfeldlab.paintera.data.mask.Masks;
import org.janelia.saalfeldlab.paintera.data.mask.persist.PersistCanvas;
import org.janelia.saalfeldlab.paintera.data.n5.*;
=======
import org.janelia.saalfeldlab.paintera.data.n5.N5Meta;
import org.janelia.saalfeldlab.paintera.data.n5.ReflectionException;
import org.janelia.saalfeldlab.paintera.data.n5.VolatileWithSet;
>>>>>>>
import org.janelia.saalfeldlab.paintera.data.n5.N5Meta;
import org.janelia.saalfeldlab.paintera.data.n5.ReflectionException;
import org.janelia.saalfeldlab.paintera.data.n5.VolatileWithSet;
<<<<<<<
import org.janelia.saalfeldlab.paintera.meshes.MeshManagerWithAssignmentForSegments;
import org.janelia.saalfeldlab.paintera.meshes.MeshWorkerPriority;
import org.janelia.saalfeldlab.paintera.state.ChannelSourceState;
import org.janelia.saalfeldlab.paintera.state.LabelSourceState;
import org.janelia.saalfeldlab.paintera.state.RawSourceState;
import org.janelia.saalfeldlab.paintera.stream.HighlightingStreamConverter;
import org.janelia.saalfeldlab.paintera.stream.ModalGoldenAngleSaturatedHighlightingARGBStream;
=======
import org.janelia.saalfeldlab.paintera.state.SourceState;
import org.janelia.saalfeldlab.paintera.state.channel.ConnectomicsChannelState;
import org.janelia.saalfeldlab.paintera.state.channel.n5.N5BackendChannel;
import org.janelia.saalfeldlab.paintera.state.label.ConnectomicsLabelState;
import org.janelia.saalfeldlab.paintera.state.label.n5.N5Backend;
import org.janelia.saalfeldlab.paintera.state.raw.ConnectomicsRawState;
import org.janelia.saalfeldlab.paintera.state.raw.n5.N5BackendRaw;
>>>>>>>
import org.janelia.saalfeldlab.paintera.meshes.MeshWorkerPriority;
import org.janelia.saalfeldlab.paintera.state.SourceState;
import org.janelia.saalfeldlab.paintera.state.channel.ConnectomicsChannelState;
import org.janelia.saalfeldlab.paintera.state.channel.n5.N5BackendChannel;
import org.janelia.saalfeldlab.paintera.state.label.ConnectomicsLabelState;
import org.janelia.saalfeldlab.paintera.state.label.n5.N5Backend;
import org.janelia.saalfeldlab.paintera.state.raw.ConnectomicsRawState;
import org.janelia.saalfeldlab.paintera.state.raw.n5.N5BackendRaw;
<<<<<<<
import org.janelia.saalfeldlab.paintera.viewer3d.ViewFrustum;
=======
>>>>>>>
import org.janelia.saalfeldlab.paintera.viewer3d.ViewFrustum;
<<<<<<<
import org.janelia.saalfeldlab.util.concurrent.HashPriorityQueueBasedTaskExecutor;
import org.janelia.saalfeldlab.util.n5.N5Data;
=======
>>>>>>>
import org.janelia.saalfeldlab.util.concurrent.HashPriorityQueueBasedTaskExecutor;
<<<<<<<
final ObjectProperty<ViewFrustum> viewFrustumProperty,
final ObjectProperty<AffineTransform3D> eyeToWorldTransformProperty,
=======
final ExecutorService propagationQueue,
>>>>>>>
final ObjectProperty<ViewFrustum> viewFrustumProperty,
final ObjectProperty<AffineTransform3D> eyeToWorldTransformProperty,
<<<<<<<
final DataSource<D, T> masked = Masks.mask(
source,
queue,
canvasCacheDirUpdate.get(),
canvasCacheDirUpdate,
commitCanvas(),
propagationExecutor);
final IdService idService = idService();
final FragmentSegmentAssignmentState assignment = assignments();
final SelectedIds selectedIds = new SelectedIds();
final SelectedSegments selectedSegments = new SelectedSegments(selectedIds, assignment);
final LockedSegmentsOnlyLocal lockedSegments = new LockedSegmentsOnlyLocal(locked -> {
});
final ModalGoldenAngleSaturatedHighlightingARGBStream stream = new
ModalGoldenAngleSaturatedHighlightingARGBStream(
selectedSegments,
lockedSegments
);
final HighlightingStreamConverter<T> converter = HighlightingStreamConverter.forType(stream, masked.getType());
final LabelBlockLookup lookup = getLabelBlockLookup(n5.get(), dataset, source);
final MeshManagerWithAssignmentForSegments meshManager = MeshManagerWithAssignmentForSegments.fromBlockLookup(
masked,
selectedSegments,
stream,
=======
final N5Backend<D, T> backend = N5Backend.createFrom(
reader,
dataset,
projectDirectory,
propagationQueue);
return new ConnectomicsLabelState<>(
backend,
>>>>>>>
final N5Backend<D, T> backend = N5Backend.createFrom(
reader,
dataset,
projectDirectory,
propagationQueue);
return new ConnectomicsLabelState<>(
backend,
<<<<<<<
viewFrustumProperty,
eyeToWorldTransformProperty,
lookup,
=======
>>>>>>>
viewFrustumProperty,
eyeToWorldTransformProperty, |
<<<<<<<
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.LongFunction;
import java.util.function.ToLongFunction;
import org.janelia.saalfeldlab.fx.event.DelegateEventHandlers;
import org.janelia.saalfeldlab.fx.event.EventFX;
import org.janelia.saalfeldlab.fx.event.KeyTracker;
import org.janelia.saalfeldlab.fx.util.InvokeOnJavaFXApplicationThread;
import org.janelia.saalfeldlab.labels.blocks.LabelBlockLookup;
import org.janelia.saalfeldlab.paintera.PainteraBaseView;
import org.janelia.saalfeldlab.paintera.cache.InvalidateAll;
import org.janelia.saalfeldlab.paintera.cache.global.GlobalCache;
import org.janelia.saalfeldlab.paintera.composition.ARGBCompositeAlphaYCbCr;
import org.janelia.saalfeldlab.paintera.composition.Composite;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode.ActiveSection;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode.ModeState;
import org.janelia.saalfeldlab.paintera.control.assignment.FragmentSegmentAssignmentOnlyLocal;
import org.janelia.saalfeldlab.paintera.control.assignment.FragmentSegmentAssignmentState;
import org.janelia.saalfeldlab.paintera.control.lock.LockedSegmentsOnlyLocal;
import org.janelia.saalfeldlab.paintera.control.lock.LockedSegmentsState;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedIds;
import org.janelia.saalfeldlab.paintera.data.DataSource;
import org.janelia.saalfeldlab.paintera.data.RandomAccessibleIntervalDataSource;
import org.janelia.saalfeldlab.paintera.data.axisorder.AxisOrder;
import org.janelia.saalfeldlab.paintera.data.mask.Mask;
import org.janelia.saalfeldlab.paintera.data.mask.MaskedSource;
import org.janelia.saalfeldlab.paintera.id.IdService;
import org.janelia.saalfeldlab.paintera.id.LocalIdService;
import org.janelia.saalfeldlab.paintera.meshes.InterruptibleFunction;
import org.janelia.saalfeldlab.paintera.meshes.ManagedMeshSettings;
import org.janelia.saalfeldlab.paintera.meshes.MeshManager;
import org.janelia.saalfeldlab.paintera.meshes.MeshManagerWithAssignmentForSegments;
import org.janelia.saalfeldlab.paintera.stream.AbstractHighlightingARGBStream;
import org.janelia.saalfeldlab.paintera.stream.HighlightingStreamConverter;
import org.janelia.saalfeldlab.paintera.stream.HighlightingStreamConverterIntegerType;
import org.janelia.saalfeldlab.paintera.stream.ModalGoldenAngleSaturatedHighlightingARGBStream;
import org.janelia.saalfeldlab.paintera.viewer3d.ViewFrustum;
import org.janelia.saalfeldlab.util.Colors;
import org.janelia.saalfeldlab.util.grids.LabelBlockLookupNoBlocks;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
=======
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.LongFunction;
import java.util.function.ToLongFunction;
import org.janelia.saalfeldlab.fx.event.DelegateEventHandlers;
import org.janelia.saalfeldlab.fx.event.EventFX;
import org.janelia.saalfeldlab.fx.event.KeyTracker;
import org.janelia.saalfeldlab.fx.util.InvokeOnJavaFXApplicationThread;
import org.janelia.saalfeldlab.labels.blocks.LabelBlockLookup;
import org.janelia.saalfeldlab.paintera.PainteraBaseView;
import org.janelia.saalfeldlab.paintera.cache.InvalidateAll;
import org.janelia.saalfeldlab.paintera.cache.global.GlobalCache;
import org.janelia.saalfeldlab.paintera.composition.ARGBCompositeAlphaYCbCr;
import org.janelia.saalfeldlab.paintera.composition.Composite;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode.ActiveSection;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode.ModeState;
import org.janelia.saalfeldlab.paintera.control.assignment.FragmentSegmentAssignmentOnlyLocal;
import org.janelia.saalfeldlab.paintera.control.assignment.FragmentSegmentAssignmentState;
import org.janelia.saalfeldlab.paintera.control.lock.LockedSegmentsOnlyLocal;
import org.janelia.saalfeldlab.paintera.control.lock.LockedSegmentsState;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedIds;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedSegments;
import org.janelia.saalfeldlab.paintera.data.DataSource;
import org.janelia.saalfeldlab.paintera.data.RandomAccessibleIntervalDataSource;
import org.janelia.saalfeldlab.paintera.data.axisorder.AxisOrder;
import org.janelia.saalfeldlab.paintera.data.mask.Mask;
import org.janelia.saalfeldlab.paintera.data.mask.MaskedSource;
import org.janelia.saalfeldlab.paintera.id.IdService;
import org.janelia.saalfeldlab.paintera.id.LocalIdService;
import org.janelia.saalfeldlab.paintera.meshes.InterruptibleFunction;
import org.janelia.saalfeldlab.paintera.meshes.ManagedMeshSettings;
import org.janelia.saalfeldlab.paintera.meshes.MeshManager;
import org.janelia.saalfeldlab.paintera.meshes.MeshManagerWithAssignmentForSegments;
import org.janelia.saalfeldlab.paintera.stream.AbstractHighlightingARGBStream;
import org.janelia.saalfeldlab.paintera.stream.HighlightingStreamConverter;
import org.janelia.saalfeldlab.paintera.stream.HighlightingStreamConverterIntegerType;
import org.janelia.saalfeldlab.paintera.stream.ModalGoldenAngleSaturatedHighlightingARGBStream;
import org.janelia.saalfeldlab.util.Colors;
import org.janelia.saalfeldlab.util.grids.LabelBlockLookupNoBlocks;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.LongFunction;
import java.util.function.ToLongFunction;
import org.janelia.saalfeldlab.fx.event.DelegateEventHandlers;
import org.janelia.saalfeldlab.fx.event.EventFX;
import org.janelia.saalfeldlab.fx.event.KeyTracker;
import org.janelia.saalfeldlab.fx.util.InvokeOnJavaFXApplicationThread;
import org.janelia.saalfeldlab.labels.blocks.LabelBlockLookup;
import org.janelia.saalfeldlab.paintera.PainteraBaseView;
import org.janelia.saalfeldlab.paintera.cache.InvalidateAll;
import org.janelia.saalfeldlab.paintera.cache.global.GlobalCache;
import org.janelia.saalfeldlab.paintera.composition.ARGBCompositeAlphaYCbCr;
import org.janelia.saalfeldlab.paintera.composition.Composite;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode.ActiveSection;
import org.janelia.saalfeldlab.paintera.control.ShapeInterpolationMode.ModeState;
import org.janelia.saalfeldlab.paintera.control.assignment.FragmentSegmentAssignmentOnlyLocal;
import org.janelia.saalfeldlab.paintera.control.assignment.FragmentSegmentAssignmentState;
import org.janelia.saalfeldlab.paintera.control.lock.LockedSegmentsOnlyLocal;
import org.janelia.saalfeldlab.paintera.control.lock.LockedSegmentsState;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedIds;
import org.janelia.saalfeldlab.paintera.control.selection.SelectedSegments;
import org.janelia.saalfeldlab.paintera.data.DataSource;
import org.janelia.saalfeldlab.paintera.data.RandomAccessibleIntervalDataSource;
import org.janelia.saalfeldlab.paintera.data.axisorder.AxisOrder;
import org.janelia.saalfeldlab.paintera.data.mask.Mask;
import org.janelia.saalfeldlab.paintera.data.mask.MaskedSource;
import org.janelia.saalfeldlab.paintera.id.IdService;
import org.janelia.saalfeldlab.paintera.id.LocalIdService;
import org.janelia.saalfeldlab.paintera.meshes.InterruptibleFunction;
import org.janelia.saalfeldlab.paintera.meshes.ManagedMeshSettings;
import org.janelia.saalfeldlab.paintera.meshes.MeshManager;
import org.janelia.saalfeldlab.paintera.meshes.MeshManagerWithAssignmentForSegments;
import org.janelia.saalfeldlab.paintera.stream.AbstractHighlightingARGBStream;
import org.janelia.saalfeldlab.paintera.stream.HighlightingStreamConverter;
import org.janelia.saalfeldlab.paintera.stream.HighlightingStreamConverterIntegerType;
import org.janelia.saalfeldlab.paintera.stream.ModalGoldenAngleSaturatedHighlightingARGBStream;
import org.janelia.saalfeldlab.paintera.viewer3d.ViewFrustum;
import org.janelia.saalfeldlab.util.Colors;
import org.janelia.saalfeldlab.util.grids.LabelBlockLookupNoBlocks;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory; |
<<<<<<<
=======
private final double centerX = 0;
private final double centerY = 0;
final private static double step = 1.0;// Math.PI / 180;
>>>>>>>
<<<<<<<
public Viewer3DFX( final double width, final double height, final Interval interval )
=======
private static final Point3D xNormal = new Point3D( 1, 0, 0 );
private static final Point3D yNormal = new Point3D( 0, 1, 0 );
private static final Point3D zNormal = new Point3D( 0, 0, 1 );
private final Affine initialTransform = new Affine();
private final Affine affine = new Affine();
public Viewer3DFX( final double width, final double height )
>>>>>>>
private final Scene3DHandler handler;
public Viewer3DFX( final double width, final double height )
<<<<<<<
=======
private class Rotate extends MouseDragFX
{
private final SimpleDoubleProperty speed = new SimpleDoubleProperty();
private final double factor;
private final Affine affineDragStart = new Affine();
@SafeVarargs
public Rotate( final String name, final DoubleProperty speed, final double factor, final Predicate< MouseEvent >... eventFilter )
{
super( name, eventFilter, affine );
LOG.trace( "rotation" );
this.factor = factor;
this.speed.set( speed.get() * this.factor );
speed.addListener( ( obs, old, newv ) -> this.speed.set( this.factor * speed.get() ) );
}
@Override
public void initDrag( final javafx.scene.input.MouseEvent event )
{
synchronized ( transformLock )
{
affineDragStart.setToTransform( affine );
}
}
@Override
public void drag( final javafx.scene.input.MouseEvent event )
{
synchronized ( transformLock )
{
LOG.trace( "drag - rotate" );
final Affine target = new Affine( affineDragStart );
final double dX = event.getX() - startX;
final double dY = event.getY() - startY;
final double v = step * this.speed.get();
LOG.trace( "dx: {} dy: {}", dX, dY );
target.prependRotation( v * dY, centerX, centerY, 0, xNormal );
target.prependRotation( v * -dX, centerX, centerY, 0, yNormal );
LOG.trace( "target: {}", target );
InvokeOnJavaFXApplicationThread.invoke( () -> {
affine.setToTransform( target );
} );
}
}
}
private class TranslateXY extends MouseDragFX
{
private final Affine affineDragStart = new Affine();
@SafeVarargs
public TranslateXY( final String name, final Predicate< MouseEvent >... eventFilter )
{
super( name, eventFilter, affine );
LOG.trace( "translate" );
}
@Override
public void initDrag( final MouseEvent event )
{}
@Override
public void drag( final MouseEvent event )
{
synchronized ( transformLock )
{
LOG.trace( "drag - translate" );
final double dX = event.getX() - startX;
final double dY = event.getY() - startY;
LOG.trace( "dx " + dX + " dy: " + dY );
InvokeOnJavaFXApplicationThread.invoke( () -> {
affine.prependTranslation( 2 * dX / getHeight(), 2 * dY / getHeight() );
} );
startX += dX;
startY += dY;
}
}
}
private void saveAsPng()
{
final WritableImage image = scene.snapshot( new SnapshotParameters(), null );
// TODO: use a file chooser here
final File file = new File( "3dscene-bigcat.png" );
// FileChooser fileChooser = new FileChooser();
// fileChooser.setTitle( "Open Resource File" );
// fileChooser.showOpenDialog( stage );
try
{
ImageIO.write( SwingFXUtils.fromFXImage( image, null ), "png", file );
}
catch ( final IOException e )
{
// TODO: handle exception here
}
}
>>>>>>> |
<<<<<<<
=======
public synchronized void updateCompleteBoundingBox( final float[] boundingBox )
{
assert completeBoundingBox.length == boundingBox.length;
completeBoundingBox = maxBoundingBox( completeBoundingBox, boundingBox );
for ( final NeuronRendererListener listener : listeners )
listener.updateCamera( completeBoundingBox );
}
private synchronized float[] maxBoundingBox( final float[] completeBoundingBox, final float[] boundingBox )
{
if ( completeBoundingBox == null )
return boundingBox;
for ( int d = 0; d < completeBoundingBox.length; d++ )
if ( d % 2 == 0 && completeBoundingBox[ d ] > boundingBox[ d ] )
completeBoundingBox[ d ] = boundingBox[ d ];
else if ( d % 2 != 0 && completeBoundingBox[ d ] < boundingBox[ d ] )
completeBoundingBox[ d ] = boundingBox[ d ];
return completeBoundingBox;
}
private class MeshSaver implements EventHandler< ActionEvent >
{
@Override
public void handle( final ActionEvent event )
{
if ( !neuron.get().isPresent() )
return;
final TriangleMesh mesh = ( TriangleMesh ) neuron.get().get().meshView().getMesh();
final FileChooser fileChooser = new FileChooser();
fileChooser.setTitle( "Save neuron with fragment " + fragmentId() + " " + segmentId() );
final SimpleObjectProperty< Optional< File > > fileProperty = new SimpleObjectProperty<>( Optional.empty() );
try
{
InvokeOnJavaFXApplicationThread.invokeAndWait( () -> {
fileProperty.set( Optional.ofNullable( fileChooser.showSaveDialog( root.sceneProperty().get().getWindow() ) ) );
} );
}
catch ( final InterruptedException e )
{
// TODO Auto-generated catch block
e.printStackTrace();
}
if ( fileProperty.get().isPresent() )
{
final File file = fileProperty.get().get();
final StringBuilder sb = new StringBuilder()
.append( "# fragment id: " ).append( fragmentId() ).append( "\n" )
.append( "# segment id: " ).append( segmentId() ).append( "\n" )
.append( "# color: " ).append( Integer.toHexString( stream.argb( selectedFragmentId ) ) );
final ObservableFloatArray vertices = mesh.getPoints();
final ObservableFloatArray normals = mesh.getNormals();
final ObservableFloatArray texCoords = mesh.getTexCoords();
final ObservableFaceArray faces = mesh.getFaces();
final int numFacesEntries = faces.size();
sb.append( "\n" );
final int numVertices = vertices.size();
for ( int k = 0; k < numVertices; k += 3 )
sb.append( "\nv " ).append( vertices.get( k + 0 ) ).append( " " ).append( vertices.get( k + 1 ) ).append( " " ).append( vertices.get( k + 2 ) );
sb.append( "\n" );
final int numNormals = normals.size();
for ( int k = 0; k < numNormals; k += 3 )
sb.append( "\nvn " ).append( normals.get( k + 0 ) ).append( " " ).append( normals.get( k + 1 ) ).append( " " ).append( normals.get( k + 2 ) );
sb.append( "\n" );
final int numTexCoords = texCoords.size();
for ( int k = 0; k < numTexCoords; k += 3 )
sb.append( "\nvn " ).append( texCoords.get( k + 0 ) ).append( " " ).append( texCoords.get( k + 1 ) );
sb.append( "\n" );
for ( int k = 0; k < numFacesEntries; k += 9 )
{
final int v1 = faces.get( k );
final int n1 = faces.get( k + 1 );
final int t1 = faces.get( k + 2 );
final int v2 = faces.get( k + 3 );
final int n2 = faces.get( k + 4 );
final int t2 = faces.get( k + 5 );
final int v3 = faces.get( k + 6 );
final int n3 = faces.get( k + 7 );
final int t3 = faces.get( k + 8 );
sb
.append( "\nf " ).append( v1 + 1 ).append( "/" ).append( t1 + 1 ).append( "/" ).append( n1 + 1 )
.append( " " ).append( v2 + 1 ).append( "/" ).append( t2 + 1 ).append( "/" ).append( n2 + 1 )
.append( " " ).append( v3 + 1 ).append( "/" ).append( t3 + 1 ).append( "/" ).append( n3 + 1 );
}
try
{
Files.write( file.toPath(), sb.toString().getBytes() );
}
catch ( final IOException e )
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
private class IdSelector implements EventHandler< MouseEvent >
{
@Override
public void handle( final MouseEvent event )
{
if ( event.isPrimaryButtonDown() && isNoModifierKeys( event ) )
{
if ( selectedIds.isOnlyActiveId( selectedFragmentId ) )
selectedIds.deactivate( selectedFragmentId );
else
selectedIds.activate( selectedFragmentId );
}
else if ( event.isSecondaryButtonDown() && isNoModifierKeys( event ) )
if ( selectedIds.isActive( selectedFragmentId ) )
selectedIds.deactivate( selectedFragmentId );
else
selectedIds.activateAlso( selectedFragmentId );
}
}
public static boolean isNoModifierKeys( final MouseEvent event )
{
return !( event.isControlDown() || event.isShiftDown() || event.isMetaDown() || event.isAltDown() );
}
>>>>>>>
private class MeshSaver implements EventHandler< ActionEvent >
{
@Override
public void handle( final ActionEvent event )
{
if ( !neuron.get().isPresent() )
return;
final TriangleMesh mesh = ( TriangleMesh ) neuron.get().get().meshView().getMesh();
final FileChooser fileChooser = new FileChooser();
fileChooser.setTitle( "Save neuron with fragment " + fragmentId() + " " + segmentId() );
final SimpleObjectProperty< Optional< File > > fileProperty = new SimpleObjectProperty<>( Optional.empty() );
try
{
InvokeOnJavaFXApplicationThread.invokeAndWait( () -> {
fileProperty.set( Optional.ofNullable( fileChooser.showSaveDialog( root.sceneProperty().get().getWindow() ) ) );
} );
}
catch ( final InterruptedException e )
{
// TODO Auto-generated catch block
e.printStackTrace();
}
if ( fileProperty.get().isPresent() )
{
final File file = fileProperty.get().get();
final StringBuilder sb = new StringBuilder()
.append( "# fragment id: " ).append( fragmentId() ).append( "\n" )
.append( "# segment id: " ).append( segmentId() ).append( "\n" )
.append( "# color: " ).append( Integer.toHexString( stream.argb( selectedFragmentId ) ) );
final ObservableFloatArray vertices = mesh.getPoints();
final ObservableFloatArray normals = mesh.getNormals();
final ObservableFloatArray texCoords = mesh.getTexCoords();
final ObservableFaceArray faces = mesh.getFaces();
final int numFacesEntries = faces.size();
sb.append( "\n" );
final int numVertices = vertices.size();
for ( int k = 0; k < numVertices; k += 3 )
sb.append( "\nv " ).append( vertices.get( k + 0 ) ).append( " " ).append( vertices.get( k + 1 ) ).append( " " ).append( vertices.get( k + 2 ) );
sb.append( "\n" );
final int numNormals = normals.size();
for ( int k = 0; k < numNormals; k += 3 )
sb.append( "\nvn " ).append( normals.get( k + 0 ) ).append( " " ).append( normals.get( k + 1 ) ).append( " " ).append( normals.get( k + 2 ) );
sb.append( "\n" );
final int numTexCoords = texCoords.size();
for ( int k = 0; k < numTexCoords; k += 3 )
sb.append( "\nvn " ).append( texCoords.get( k + 0 ) ).append( " " ).append( texCoords.get( k + 1 ) );
sb.append( "\n" );
for ( int k = 0; k < numFacesEntries; k += 9 )
{
final int v1 = faces.get( k );
final int n1 = faces.get( k + 1 );
final int t1 = faces.get( k + 2 );
final int v2 = faces.get( k + 3 );
final int n2 = faces.get( k + 4 );
final int t2 = faces.get( k + 5 );
final int v3 = faces.get( k + 6 );
final int n3 = faces.get( k + 7 );
final int t3 = faces.get( k + 8 );
sb
.append( "\nf " ).append( v1 + 1 ).append( "/" ).append( t1 + 1 ).append( "/" ).append( n1 + 1 )
.append( " " ).append( v2 + 1 ).append( "/" ).append( t2 + 1 ).append( "/" ).append( n2 + 1 )
.append( " " ).append( v3 + 1 ).append( "/" ).append( t3 + 1 ).append( "/" ).append( n3 + 1 );
}
try
{
Files.write( file.toPath(), sb.toString().getBytes() );
}
catch ( final IOException e )
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
private class IdSelector implements EventHandler< MouseEvent >
{
@Override
public void handle( final MouseEvent event )
{
if ( event.isPrimaryButtonDown() && isNoModifierKeys( event ) )
{
if ( selectedIds.isOnlyActiveId( selectedFragmentId ) )
selectedIds.deactivate( selectedFragmentId );
else
selectedIds.activate( selectedFragmentId );
}
else if ( event.isSecondaryButtonDown() && isNoModifierKeys( event ) )
if ( selectedIds.isActive( selectedFragmentId ) )
selectedIds.deactivate( selectedFragmentId );
else
selectedIds.activateAlso( selectedFragmentId );
}
}
public static boolean isNoModifierKeys( final MouseEvent event )
{
return !( event.isControlDown() || event.isShiftDown() || event.isMetaDown() || event.isAltDown() );
} |
<<<<<<<
import net.imglib2.RandomAccessibleInterval;
=======
import net.imglib2.realtransform.AffineTransform3D;
>>>>>>>
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.realtransform.AffineTransform3D;
<<<<<<<
// if one of the neighbors chunks exists, creates it
=======
// if one of the neighbors chunks exists, creates it
>>>>>>>
// if one of the neighbors chunks exists, creates it |
<<<<<<<
=======
for ( int i = 0; i < rawDataLoaders.length; ++i )
rawDataLoaders[ i ].setCache( imgLoader.getCacheControl() );
>>>>>>>
<<<<<<<
=======
for ( final SetCache setCache : labelLoaders )
setCache.setCache( imgLoader.getCacheControl() );
>>>>>>> |
<<<<<<<
import org.janelia.saalfeldlab.paintera.viewer3d.ViewFrustum;
import org.janelia.saalfeldlab.util.concurrent.HashPriorityQueueBasedTaskExecutor;
=======
import org.janelia.saalfeldlab.paintera.state.label.ConnectomicsLabelState;
>>>>>>>
import org.janelia.saalfeldlab.paintera.viewer3d.ViewFrustum;
import org.janelia.saalfeldlab.util.concurrent.HashPriorityQueueBasedTaskExecutor;
import org.janelia.saalfeldlab.paintera.state.label.ConnectomicsLabelState;
<<<<<<<
final IntersectingSourceState state = new IntersectingSourceState(
(ThresholdingSourceState) thresholdedState,
(LabelSourceState) labelState,
composite,
name,
queue,
priority,
meshesGroup,
viewFrustumProperty,
eyeToWorldTransformProperty,
manager,
workers);
return state;
=======
if (labelState instanceof ConnectomicsLabelState<?, ?>)
return new IntersectingSourceState(
(ThresholdingSourceState) thresholdedState,
(ConnectomicsLabelState) labelState,
composite,
name,
queue,
priority,
meshesGroup,
manager,
workers);
else if (labelState instanceof LabelSourceState<?, ?>)
return new IntersectingSourceState(
(ThresholdingSourceState) thresholdedState,
(LabelSourceState) labelState,
composite,
name,
queue,
priority,
meshesGroup,
manager,
workers);
else
throw new JsonParseException("Expected "
+ ConnectomicsLabelState.class.getName() + " or "
+ LabelSourceState.class.getName() + " as second dependency but got "
+ labelState.getClass().getName() + " instead.");
>>>>>>>
if (labelState instanceof ConnectomicsLabelState<?, ?>)
return new IntersectingSourceState(
(ThresholdingSourceState) thresholdedState,
(ConnectomicsLabelState) labelState,
composite,
name,
queue,
priority,
meshesGroup,
viewFrustumProperty,
eyeToWorldTransformProperty,
manager,
workers);
else if (labelState instanceof LabelSourceState<?, ?>)
return new IntersectingSourceState(
(ThresholdingSourceState) thresholdedState,
(LabelSourceState) labelState,
composite,
name,
queue,
priority,
meshesGroup,
viewFrustumProperty,
eyeToWorldTransformProperty,
manager,
workers);
else
throw new JsonParseException("Expected "
+ ConnectomicsLabelState.class.getName() + " or "
+ LabelSourceState.class.getName() + " as second dependency but got "
+ labelState.getClass().getName() + " instead."); |
<<<<<<<
import javafx.beans.InvalidationListener;
import javafx.beans.property.*;
=======
import javafx.beans.binding.Bindings;
import javafx.beans.binding.ObjectBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;
>>>>>>>
import javafx.beans.InvalidationListener;
import javafx.beans.binding.Bindings;
import javafx.beans.binding.ObjectBinding;
import javafx.beans.property.*;
<<<<<<<
import org.janelia.saalfeldlab.util.concurrent.PriorityExecutorService;
=======
import org.janelia.saalfeldlab.util.NamedThreadFactory;
>>>>>>>
import org.janelia.saalfeldlab.util.NamedThreadFactory;
import org.janelia.saalfeldlab.util.concurrent.PriorityExecutorService;
<<<<<<<
import java.util.*;
=======
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
>>>>>>>
import java.util.*;
<<<<<<<
if (!sceneBlockTrees.containsKey(blockTreeParametersKey))
{
sceneBlockTrees.put(blockTreeParametersKey, SceneBlockTree.createSceneBlockTree(
source,
viewFrustumProperty.get(),
eyeToWorldTransformProperty.get(),
blockTreeParametersKey.levelOfDetail,
blockTreeParametersKey.highestScaleLevel,
rendererGrids
));
}
=======
LOG.debug("Adding mesh for segment {}.", id);
final MeshSettings meshSettings = this.meshSettings.getOrAddMesh(idObject);
final MeshGenerator<TLongHashSet> nfx = new MeshGenerator<>(
fragments,
blockListCache,
meshCache,
color,
meshSettings.scaleLevelProperty().get(),
meshSettings.simplificationIterationsProperty().get(),
meshSettings.smoothingLambdaProperty().get(),
meshSettings.smoothingIterationsProperty().get(),
managers,
workers
);
final BooleanProperty isManaged = this.meshSettings.isManagedProperty(id);
final ObjectBinding<MeshSettings> segmentMeshSettings = Bindings.createObjectBinding(
() -> isManaged.get() ? this.meshSettings.getGlobalSettings() : meshSettings,
isManaged);
nfx.meshSettingsProperty().bind(segmentMeshSettings);
neurons.put(idObject, nfx);
root.getChildren().add(nfx.getRoot());
>>>>>>>
if (!sceneBlockTrees.containsKey(blockTreeParametersKey))
{
sceneBlockTrees.put(blockTreeParametersKey, SceneBlockTree.createSceneBlockTree(
source,
viewFrustumProperty.get(),
eyeToWorldTransformProperty.get(),
blockTreeParametersKey.levelOfDetail,
blockTreeParametersKey.highestScaleLevel,
rendererGrids
));
}
<<<<<<<
final MeshGenerator<TLongHashSet> mesh = neurons.remove(id);
if (mesh != null)
{
InvokeOnJavaFXApplicationThread.invoke(() -> root.getChildren().remove(mesh.getRoot()));
mesh.interrupt();
mesh.unbind();
}
=======
removeMeshes(Collections.singletonList(id));
>>>>>>>
removeMeshes(Collections.singletonList(id));
<<<<<<<
=======
final HashMap<Long, MeshGenerator<TLongHashSet>> toBeRemoved = new HashMap<>();
tbr.forEach(l -> {
final MeshGenerator<TLongHashSet> m = neurons.get(l);
if (m != null)
toBeRemoved.put(l, m);
});
toBeRemoved.values().forEach(mesh -> mesh.isEnabledProperty().set(false));
>>>>>>>
final HashMap<Long, MeshGenerator<TLongHashSet>> toBeRemoved = new HashMap<>();
tbr.forEach(l -> {
final MeshGenerator<TLongHashSet> m = neurons.get(l);
if (m != null)
toBeRemoved.put(l, m);
});
<<<<<<<
InvokeOnJavaFXApplicationThread.invoke(() -> root.getChildren().setAll(existingGroups));
=======
root.getChildren().setAll(existingGroups);
toBeRemoved.values().forEach(m -> m.meshSettingsProperty().unbind());
// unbind() for each mesh here takes way too long for some reason. Do it on a separate thread to avoid app freezing.
bindAndUnbindService.submit(() -> toBeRemoved.values().forEach(m -> m.meshSettingsProperty().set(null)));
>>>>>>>
root.getChildren().setAll(existingGroups);
toBeRemoved.values().forEach(m -> m.meshSettingsProperty().unbind());
// unbind() for each mesh here takes way too long for some reason. Do it on a separate thread to avoid app freezing.
bindAndUnbindService.submit(() -> toBeRemoved.values().forEach(m -> m.meshSettingsProperty().set(null))); |
<<<<<<<
final PriorityExecutorService<MeshWorkerPriority> workers,
final String projectDirectory) throws IOException, ReflectionException {
=======
final ExecutorService workers,
final Supplier<String> projectDirectory) throws IOException, ReflectionException {
>>>>>>>
final PriorityExecutorService<MeshWorkerPriority> workers,
final Supplier<String> projectDirectory) throws IOException, ReflectionException { |
<<<<<<<
import java.io.File;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.Optional;
import java.util.function.Predicate;
import javax.imageio.ImageIO;
import org.janelia.saalfeldlab.fx.ObservableWithListenersList;
import org.janelia.saalfeldlab.fx.event.MouseDragFX;
import org.janelia.saalfeldlab.fx.util.InvokeOnJavaFXApplicationThread;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
=======
>>>>>>>
import java.io.File;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.Optional;
import java.util.function.Predicate;
import javax.imageio.ImageIO;
import org.janelia.saalfeldlab.fx.ObservableWithListenersList;
import org.janelia.saalfeldlab.fx.event.MouseDragFX;
import org.janelia.saalfeldlab.fx.util.InvokeOnJavaFXApplicationThread;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<<<<<<<
public class Scene3DHandler extends ObservableWithListenersList
=======
import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.Optional;
import java.util.function.Predicate;
public class Scene3DHandler
>>>>>>>
public class Scene3DHandler extends ObservableWithListenersList |
<<<<<<<
import com.amcolabs.quizapp.widgets.CustomProgressBar;
=======
import com.amcolabs.quizapp.widgets.GothamButtonView;
>>>>>>>
import com.amcolabs.quizapp.widgets.CustomProgressBar;
import com.amcolabs.quizapp.widgets.GothamButtonView; |
<<<<<<<
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
=======
import javafx.beans.property.ObjectProperty;
>>>>>>>
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
<<<<<<<
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;
=======
import javafx.beans.property.SimpleObjectProperty;
>>>>>>>
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;
<<<<<<<
private final BooleanProperty showBlockBoundaries = new SimpleBooleanProperty();
private final IntegerProperty rendererBlockSize = new SimpleIntegerProperty();
=======
private final ObjectProperty<Color> backgroundFill = new SimpleObjectProperty<>(Color.BLACK);
>>>>>>>
private final BooleanProperty showBlockBoundaries = new SimpleBooleanProperty();
private final IntegerProperty rendererBlockSize = new SimpleIntegerProperty();
private final ObjectProperty<Color> backgroundFill = new SimpleObjectProperty<>(Color.BLACK);
<<<<<<<
public void setAffine(final Affine affine) {
handler.setAffine(affine);
=======
public void addAffineListener(final TransformListener<Affine> listener) {
handler.addAffineListener(listener);
}
public ObjectProperty<Color> backgroundFillProperty() {
return backgroundFill;
}
private static Affine fromAffineTransform3D(final AffineTransform3D affineTransform3D) {
return new Affine(
affineTransform3D.get(0, 0), affineTransform3D.get(0, 1), affineTransform3D.get(0, 2), affineTransform3D.get(0, 3),
affineTransform3D.get(1, 0), affineTransform3D.get(1, 1), affineTransform3D.get(1, 2), affineTransform3D.get(1, 3),
affineTransform3D.get(2, 0), affineTransform3D.get(2, 1), affineTransform3D.get(2, 2), affineTransform3D.get(2, 3));
};
private static AffineTransform3D fromAffine(final Affine affine) {
final AffineTransform3D affineTransform3D = new AffineTransform3D();
affineTransform3D.set(
affine.getMxx(), affine.getMxy(), affine.getMxz(), affine.getTx(),
affine.getMyx(), affine.getMyy(), affine.getMyz(), affine.getTy(),
affine.getMzx(), affine.getMzy(), affine.getMzz(), affine.getTz());
return affineTransform3D;
>>>>>>>
public void setAffine(final Affine affine) {
handler.setAffine(affine);
}
public void addAffineListener(final TransformListener<Affine> listener) {
handler.addAffineListener(listener);
}
public ObjectProperty<Color> backgroundFillProperty() {
return backgroundFill; |
<<<<<<<
WinOrLoseController resultScreen = (WinOrLoseController) quizApp.loadAppController(WinOrLoseController.class);
resultScreen.loadResultScreen(quiz,currentUsers,userAnswersStack);
=======
// WinOrLoseController resultScreen = (WinOrLoseController) quizApp.loadAppController(WinOrLoseController.class);
// resultScreen.loadResultScreen();
>>>>>>>
// WinOrLoseController resultScreen = (WinOrLoseController) quizApp.loadAppController(WinOrLoseController.class);
// resultScreen.loadResultScreen(quiz,currentUsers,userAnswersStack); |
<<<<<<<
// TODO meshCache has access to ShapeKey.scaleIndex(). Instead of passing an array of
// TODO caches, pass a single cache instead and use ShapeKey.scaleIndex() inside the cache.
=======
private SceneUpdateParameters sceneUpdateParameters;
>>>>>>>
private SceneUpdateParameters sceneUpdateParameters;
// TODO meshCache has access to ShapeKey.scaleIndex(). Instead of passing an array of
// TODO caches, pass a single cache instead and use ShapeKey.scaleIndex() inside the cache.
<<<<<<<
this.opacity.get()),
=======
this.opacity.get()
),
>>>>>>>
this.opacity.get()),
<<<<<<<
this.opacity);
=======
this.opacity
);
>>>>>>>
this.opacity);
<<<<<<<
interrupt();
final int scaleIndex = this.scaleIndex.get();
final Pair<Future<Void>, MeshGeneratorJobManager<T>.ManagementTask> futureAndTask = manager.submit(
id,
scaleIndex,
meshSimplificationIterations.intValue(),
smoothingLambda.doubleValue(),
smoothingIterations.intValue(),
blockListCache[scaleIndex],
meshCache[scaleIndex],
submittedTasks::set,
completedTasks::set,
() -> {});
LOG.debug("Submitting new task {}", futureAndTask);
this.activeFuture.set(futureAndTask.getA());
this.activeTask.set(futureAndTask.getB());
=======
LOG.debug("Block tree for {} is not initialized yet", id);
return;
>>>>>>>
LOG.info("Block tree for {} is not initialized yet", id);
return; |
<<<<<<<
import horse.wtf.nzyme.notifications.FieldNames;
import horse.wtf.nzyme.notifications.Notification;
=======
import horse.wtf.nzyme.dot11.Dot11MetaInformation;
import horse.wtf.nzyme.graylog.GraylogFieldNames;
import horse.wtf.nzyme.graylog.Notification;
>>>>>>>
import horse.wtf.nzyme.dot11.Dot11MetaInformation;
import horse.wtf.nzyme.notifications.FieldNames;
import horse.wtf.nzyme.notifications.Notification;
<<<<<<<
.addField(FieldNames.SUBTYPE, "malformed"), null);
=======
.addField(GraylogFieldNames.SUBTYPE, "malformed"), meta);
>>>>>>>
.addField(FieldNames.SUBTYPE, "malformed"), meta); |
<<<<<<<
import java.util.regex.Pattern;
=======
/**
* Naming convention for Wavefront.
*
* @author Jon Schneider
* @since 1.0.0
*/
>>>>>>>
import java.util.regex.Pattern;
/**
* Naming convention for Wavefront.
*
* @author Jon Schneider
* @since 1.0.0
*/ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.